Files
HugoBlox-kit/layouts/shortcodes/mention.html
T
George Cushen 601620c7a6 feat: make taxonomy URLs singular
- make taxonomy URLs singular, consistent with other Academic pages (workaround Hugo attempting to publish taxonomy URLs with plural names). This requires the breaking change below.
- Fix extra space/lines appearing in the author cards underneath page content as reported at https://spectrum.chat/academic/help/publication-widget-adds-additional-lines-at-bottom-of-the-page~315f77d8-7cc8-44a9-a431-5b64b7556c53

BREAKING CHANGE:
Rename `name` to `title` in author profiles within `author/` folder.
2020-04-15 01:17:56 +01:00

11 lines
379 B
HTML

{{- $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 -}}