7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-27 06:10:19 +00:00
web-ansol.org/themes/academic/layouts/shortcodes/mention.html

11 lines
379 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{- $username := .Get 0 -}}
{{- $username_url := $username | urlize -}}
{{- $taxonomy := "authors" -}}
{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $username_url) -}}
{{- $name := $profile_page.Title | default ($username|markdownify) -}}
{{- with $profile_page -}}
<a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
{{- else -}}
{{- $name -}}
{{- end -}}