From 0c8782d62e45f78b821663ecddffd78a4446c8f6 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Thu, 7 Jul 2022 06:36:40 -0400 Subject: generators/hugo/layouts/shortcodes: Add mark --- generators/hugo/themes/tdro/layouts/shortcodes/mark.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 generators/hugo/themes/tdro/layouts/shortcodes/mark.html (limited to 'generators') diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/mark.html b/generators/hugo/themes/tdro/layouts/shortcodes/mark.html new file mode 100644 index 0000000..3558a02 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/mark.html @@ -0,0 +1,9 @@ +{{- $text := default "mark" (.Get "text" | default (.Get 0)) -}} +{{- $title := default "highlighted text" (.Get "title" | default (.Get 1)) -}} + +{{- if gt (len .Inner) 1 -}} + {{- $text = .Inner -}} +{{- end -}} + +{{- $text | markdownify -}} +{{- /* This comment removes trailing newlines and white spaces. */ -}} -- cgit v1.2.3