dont show articles in posts list if section is empty
This commit is contained in:
parent
603a9f6d6e
commit
0587cd2803
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{{/* get all the pages that are regular posts and not pages */}}
|
{{/* get all the pages that are regular posts and not pages */}}
|
||||||
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
|
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
|
||||||
{{ $allPostsList := where site.RegularPages "Section" "in" $postsDir }}
|
{{ $allPostsList := where (where site.RegularPages "Section" "in" $postsDir) "Section" "!=" "" }}
|
||||||
{{- partial "showcase.html" . -}}
|
{{- partial "showcase.html" . -}}
|
||||||
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
|
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue