From 5cd3426564a1783dec52a0e2e6a2d5eaf91168c8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 16:45:59 +0100 Subject: [PATCH] refactor author handling --- layouts/_default/list.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d7a0fea..fcf6b57 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -23,14 +23,16 @@ - {{ 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) }} - + - {{ end }} + {{ end }} {{ end }} {{ range .Param "categories" }}