diff --git a/layouts/shortcodes/mention.html b/layouts/shortcodes/mention.html new file mode 100644 index 00000000..3eb5e02b --- /dev/null +++ b/layouts/shortcodes/mention.html @@ -0,0 +1,10 @@ +{{- $username := .Get 0 -}} +{{- $username_url := $username | urlize -}} +{{- $taxonomy := "authors" -}} +{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $username_url) -}} +{{- $name := $profile_page.Params.name | default ($username|markdownify) -}} +{{- with $profile_page -}} + {{$name}} +{{- else -}} + {{- $name -}} +{{- end -}}