diff options
-rw-r--r-- | content/canory/messages/selfdestruct.md | 4 | ||||
-rw-r--r-- | themes/default/layouts/shortcodes/markdown.html | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/content/canory/messages/selfdestruct.md b/content/canory/messages/selfdestruct.md index c4bb726..20b4ff6 100644 --- a/content/canory/messages/selfdestruct.md +++ b/content/canory/messages/selfdestruct.md @@ -22,7 +22,7 @@ controversy. This is not to be indexed --- search engine bots {{< smallcaps "shall not pass" >}} (hopefully), neither will this message propogate through `JSON` and `RSS` feeds. -This {{< markdown title="hidden in plain sight" >}} will only disappear in my -timeline because I'm an intergalactic time traveler. +This {{< markdown text="hidden message" title="hidden in plain sight" >}} will +only disappear in my timeline because I'm an intergalactic time traveler. ![Isaac Asimov](/canory/media/internet-is-serious.jpg) diff --git a/themes/default/layouts/shortcodes/markdown.html b/themes/default/layouts/shortcodes/markdown.html index c40c0b9..3bc8726 100644 --- a/themes/default/layouts/shortcodes/markdown.html +++ b/themes/default/layouts/shortcodes/markdown.html @@ -1,14 +1,17 @@ {{- $link := default (print "/" (partial "function-paths-markdown.html") "/" .Page.File ) (.Get "link" | default (.Get 0)) -}} -{{- $name := default (path.Base .Page.File) (.Get "name" | default (.Get 1)) -}} -{{- $title := default "Markdown Embed" (.Get "title" | default (.Get 2)) -}} +{{- $text := default (path.Base .Page.File) (.Get "text" | default (.Get 1)) -}} +{{- $title := default "" (.Get "title" | default (.Get 2)) -}} {{- $embed := default false (.Get "embed" | default (.Get 3)) -}} {{- if $embed -}} - {{ print + {{- if not $title -}} + {{- $title = "Markdown Embed" -}} + {{- end -}} + {{- print "{{< self " "url=" "\"" $link "\"" " " "title=" "\"" $title "\"" " " ">}}" | markdownify }} {{- else -}} - {{- print "[" $name "]" "(" $link " " "\"" $link "\"" ")" | markdownify -}} + {{- print "[" $text "]" "(" $link " " "\"" (or $title $link) "\"" ")" | markdownify -}} {{- end -}} |