mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
20 lines
574 B
HTML
20 lines
574 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/content/writing-markdown-latex/#mention-a-user
|
|
|
|
Parameters
|
|
----------
|
|
#0 : positional
|
|
User account in Hugo Blox Kit to mention.
|
|
*/}}
|
|
|
|
{{- $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 -}}
|