-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
rtl
and ltr
shortcodes (#293)
refer adityatelange/hugo-PaperMod#293 (comment) for usage guide and examples
- Loading branch information
1 parent
ee901b3
commit 880c833
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |