diff options
author | Thedro Neely <thedroneely@gmail.com> | 2022-07-07 06:36:40 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2022-07-07 06:36:40 -0400 |
commit | 0c8782d62e45f78b821663ecddffd78a4446c8f6 (patch) | |
tree | 4541f98e4ca23607e14e65517433bdfe94431781 /generators | |
parent | 203b2889f124ac84db842baee4722379f234b7f6 (diff) | |
download | thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.gz thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.bz2 thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.zip |
generators/hugo/layouts/shortcodes: Add mark
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. */ -}} |