diff options
Diffstat (limited to 'generators')
-rw-r--r-- | generators/hugo/themes/tdro/layouts/shortcodes/mark.html | 9 |
1 files changed, 9 insertions, 0 deletions
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 -}} + +<mark title="{{- $title -}}">{{- $text | markdownify -}}</mark> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |