Skip to content

Commit

Permalink
fix the link to authors' homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
AL-JiongYang committed Jan 13, 2021
1 parent 60a05bc commit 796c410
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion layouts/partials/page_metadata_authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@

<span>
{{- if and $profile_page $link_authors -}}
<a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
{{- $query := where (where site.Pages "Section" "authors") ".Params.title" $name -}}
{{- range $idx, $tmp := $query -}}
{{- if eq $idx (add (len $query) -1) -}}
{{- $link := .Params.homepage -}}
{{- with $link -}}<a href="{{.}}">{{- end -}} {{$name}} {{- if $link -}}</a>{{- end -}}
{{- end -}}
{{- end -}}
<!-- <a href="{{$profile_page.RelPermalink}}">{{$name}}</a> -->
{{- else -}}
{{$name}}
{{- end -}}
Expand Down

0 comments on commit 796c410

Please sign in to comment.