aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/markdown.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/markdown.html')
-rw-r--r--themes/default/layouts/shortcodes/markdown.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/markdown.html b/themes/default/layouts/shortcodes/markdown.html
new file mode 100644
index 0000000..c40c0b9
--- /dev/null
+++ b/themes/default/layouts/shortcodes/markdown.html
@@ -0,0 +1,14 @@
+{{- $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)) -}}
+{{- $embed := default false (.Get "embed" | default (.Get 3)) -}}
+
+{{- if $embed -}}
+ {{ print
+ "{{< self "
+ "url=" "\"" $link "\"" " "
+ "title=" "\"" $title "\"" " "
+ ">}}" | markdownify }}
+{{- else -}}
+ {{- print "[" $name "]" "(" $link " " "\"" $link "\"" ")" | markdownify -}}
+{{- end -}}