refactor author handling

This commit is contained in:
Robert Kaussow 2018-12-20 16:45:59 +01:00
parent 4eb2f4cbca
commit 5cd3426564
1 changed files with 7 additions and 5 deletions

View File

@ -23,14 +23,16 @@
</time>
</span>
{{ range .Param "authors" }}
{{ $name := . }}
{{ with $.Site.GetPage (printf "/authors/%s" $name | urlize) }}
{{ with .Params.Author }}
{{ $key := . }}
{{ $author := index $.Site.Data.authors $key }}
{{ with $.Site.GetPage (printf "/authors/%s" $author.name | urlize) }}
<span class="post-footer__button">
<i class="fas fa-user post-footer__icon"></i>
<a class="post-footer__link" href="{{ .RelPermalink }}" title="Alle Artikel des Autors">{{ $name }}</a>
<a class="post-footer__link" href="{{ .RelPermalink }}" title="Alle Artikel des Autors">{{ $author.name }}</a>
</span>
{{ end }}
{{ end }}
{{ end }}
{{ range .Param "categories" }}