diff options
author | Dillon <dillonzq@outlook.com> | 2020-02-17 07:44:04 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-02-17 07:44:04 +0300 |
commit | a276661f0a154938b4d7885e97979780253891a5 (patch) | |
tree | e0699fe35d54031d0afd70c46b4a0a4dc1099bcb /layouts/index.html | |
parent | dd78d80fefed13cd0ab50563b6b40ca057811e3e (diff) |
feat(home): improve default behavior of hiddenFromHomePage
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index a668db1..0d3779e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,11 @@ {{- if .Site.Params.home.posts.enable -}} {{- /* Paginate */ -}} {{- $paginator := where .Site.RegularPages "Type" "posts" -}} - {{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}} + {{- if ne .Site.Params.home.posts.mode.defaultHiddenFromHomePage false -}} + {{- $paginator = where $paginator "Params.hiddenfromhomepage" "!=" true -}} + {{- else -}} + {{- $paginator = where $paginator "Params.hiddenfromhomepage" false -}} + {{- end -}} {{- with .Site.Params.home.posts.paginate -}} {{- $paginator = $.Paginate $paginator . -}} {{- else -}} |