Add support for rtl
and ltr
shortcodes (#293)
refer https://github.com/adityatelange/hugo-PaperMod/pull/293#issue-585979395 for usage guide and examples
This commit is contained in:
parent
306aa9fbfc
commit
80ad6ec2a3
15
layouts/shortcodes/ltr.html
Normal file
15
layouts/shortcodes/ltr.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ $.Scratch.Set "md" false }}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "md" (.Get "md") }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "md" (.Get 0) }}
|
||||
{{ end }}
|
||||
|
||||
<div dir="ltr">
|
||||
{{ if eq ($.Scratch.Get "md") false }}
|
||||
{{ .Inner }}
|
||||
{{ else }}
|
||||
{{ .Inner | markdownify }}
|
||||
{{ end }}
|
||||
</div>
|
15
layouts/shortcodes/rtl.html
Normal file
15
layouts/shortcodes/rtl.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ $.Scratch.Set "md" false }}
|
||||
|
||||
{{ if .IsNamedParams }}
|
||||
{{ $.Scratch.Set "md" (.Get "md") }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "md" (.Get 0) }}
|
||||
{{ end }}
|
||||
|
||||
<div dir="rtl">
|
||||
{{ if eq ($.Scratch.Get "md") false }}
|
||||
{{ .Inner }}
|
||||
{{ else }}
|
||||
{{ .Inner | markdownify }}
|
||||
{{ end }}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user