From eb0da04116221731c5d425f3bc52a558adc705bf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 9 Oct 2018 11:05:24 +0200 Subject: [PATCH] rework categories and authors --- layouts/_default/list.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2cc2c9c..aa21ac2 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,5 @@ {{ define "main" }} -
+
{{ $paginator := .Paginate (where .Pages "Type" "post") }} {{ range $paginator.Pages }}
@@ -22,18 +22,26 @@ - {{ with .Param "authors" }} + {{ range .Param "authors" }} + {{ $name := . }} + {{ with $.Site.GetPage (printf "/authors/%s" $name | urlize) }} - {{ . }} + {{ $name }} {{ end }} + {{ end }} + + {{ range .Param "categories" }} + {{ $name := . }} + {{ with $.Site.GetPage (printf "/categories/%s" $name | urlize) }} - + {{ $name }} + {{ end }} - + {{ end }}
{{ end }}