added option to set a page as home; added options to hide title or share button in post

This commit is contained in:
Gabriele Musco 2022-03-27 16:57:28 +02:00
parent 0587cd2803
commit 2b7198b032
No known key found for this signature in database
GPG key ID: 0587A5D65B5DC99E
4 changed files with 59 additions and 40 deletions

View file

@ -4,6 +4,12 @@
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
{{ $allPostsList := where (where site.RegularPages "Section" "in" $postsDir) "Section" "!=" "" }}
{{- partial "showcase.html" . -}}
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
{{ if and .Site.Params.showSinglePageAsHome (ne .Site.Params.homeSinglePage "") }}
{{ with .Site.GetPage .Site.Params.homeSinglePage }}
{{- partial "single_post.html" . -}}
{{ end }}
{{ else }}
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
{{ end }}
{{ end }}