blob: 9efc8592c01d8dcb695e31e89d3b7e2ddf43018b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{{- $link := default (print "/" (partial "function-paths.html" "markdown") "/" .Page.File ) (.Get "link" | default (.Get 0)) -}}
{{- $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 -}}
{{- if not $title -}}
{{- $title = "Markdown Embed" -}}
{{- end -}}
{{- print
"{{< self "
"url=" "\"" $link "\"" " "
"title=" "\"" $title "\"" " "
">}}" | markdownify }}
{{- else -}}
{{- print "[" $text "]" "(" $link " " "\"" (or $title $link) "\"" ")" | markdownify -}}
{{- end -}}
|