add config param(notAllowedTypesInHome)

This commit is contained in:
zzossig 2020-01-02 11:11:38 +09:00
parent 363867570d
commit 9192ba2216
6 changed files with 19 additions and 5 deletions

View File

@ -221,6 +221,9 @@ description = "The Zzo theme for Hugo example site." # for SEO
custom_css = [] # custom_css = ["scss/custom.scss"] and then make file at root/assets/scss/custom.scss
custom_js = [] # custom_js = ["js/custom.js"] and then make file at root/assets/js/custom.js
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page
# header
homeHeaderType = "text" # text, img, slide
@ -266,7 +269,6 @@ showPoweredBy = true # show footer text: Powered by Hugo and Zzo theme
showFeedLinks = true # RSS Feed
showSocialLinks = true # email, facebook, twitter ...
enableLangChange = true # show button at bottom left of footer.
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
# service
baiduAnalytics = "" # alternative of google analytics

View File

@ -215,6 +215,9 @@ description = "The Zzo theme for Hugo example site." # for SEO
custom_css = [] # custom_css = ["scss/custom.scss"] and then make file at root/assets/scss/custom.scss
custom_js = [] # custom_js = ["js/custom.js"] and then make file at root/assets/js/custom.js
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page
# header
homeHeaderType = "text" # text, img, slide
@ -260,7 +263,6 @@ showPoweredBy = true # show footer text: Powered by Hugo and Zzo theme
showFeedLinks = true # RSS Feed
showSocialLinks = true # email, facebook, twitter ...
enableLangChange = true # show button at bottom left of footer.
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
# service
baiduAnalytics = "" # alternative of google analytics

View File

@ -1,6 +1,7 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
publishDate: {{ .Date }}
description:
tags:
-

View File

@ -261,6 +261,11 @@
li {
margin-left: 2rem;
margin-bottom: calc(1rem / 2);
code {
padding: 3px 5px;
margin: 0 0.25rem;
}
}
hr {

View File

@ -13,9 +13,13 @@
</article>
<div class="summary__container">
{{ $paginator := .Paginate (where (where (where .Site.RegularPages "Type" "!=" "contact") "Type" "!=" "archive") "Type" "!=" "about") }}
{{ $filteredPages := .Site.RegularPages }}
{{ range .Site.Params.notAllowedTypesInHome }}
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
{{ end }}
{{ $paginator := .Paginate $filteredPages }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ .Render "summary" }}
{{ end }}
</div> {{ partial "pagination/pagination" . }}
</main>