mention.html 379 B

12345678910
  1. {{- $username := .Get 0 -}}
  2. {{- $username_url := $username | urlize -}}
  3. {{- $taxonomy := "authors" -}}
  4. {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $username_url) -}}
  5. {{- $name := $profile_page.Title | default ($username|markdownify) -}}
  6. {{- with $profile_page -}}
  7. <a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
  8. {{- else -}}
  9. {{- $name -}}
  10. {{- end -}}