{{- $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 -}} {{- printf `{{< self url=%q title=%q >}}` $link $title | markdownify }} {{- else -}} {{- printf `[%s](%s "%s")` $text $link (or $title $link) | markdownify -}} {{- end -}}