From 37ca2cc167a215c38034918c662dd8953848d5c0 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Mon, 7 Sep 2020 12:32:08 +0200 Subject: [PATCH] fix(archive): display categories list when it's available --- layouts/page/archive.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/page/archive.html b/layouts/page/archive.html index 7c47fbc..8281ec3 100644 --- a/layouts/page/archive.html +++ b/layouts/page/archive.html @@ -5,16 +5,19 @@ {{ partial "sidebar/left.html" . }}
+ {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} + {{ if $categories }}

Categories

- {{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }} + {{ range $categories }} {{ partial "article-list/tile" (dict "context" . "size" "250x150") }} {{ end }}
+ {{ end }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}