diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4efb67..90e5b66 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -42,8 +42,17 @@ {{ end }} - {{ $subsections := .Sections }} - {{ with $subsections }} + {{- $subsections := .Sections -}} + {{- $pages := .Pages | complement $subsections -}} + + {{- if eq (len $pages) 0 -}} + {{/* If there are no normal pages, display subsections in list style, with pagination */}} + {{/* This happens with taxonomies like categories or tags */}} + {{- $pages = $subsections -}} + {{- $subsections = slice -}} + {{- end -}} + + {{- with $subsections -}}