From 80ad6ec2a33082e8c0780e9a955bba7803eca2f4 Mon Sep 17 00:00:00 2001 From: Mohammad Noor Abu Khleif Date: Mon, 22 Mar 2021 13:17:40 +0200 Subject: Add support for `rtl` and `ltr` shortcodes (#293) refer https://github.com/adityatelange/hugo-PaperMod/pull/293#issue-585979395 for usage guide and examples --- layouts/shortcodes/rtl.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 layouts/shortcodes/rtl.html (limited to 'layouts/shortcodes/rtl.html') diff --git a/layouts/shortcodes/rtl.html b/layouts/shortcodes/rtl.html new file mode 100644 index 0000000..a69b8ce --- /dev/null +++ b/layouts/shortcodes/rtl.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
+ {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
-- cgit v1.2.3