add config param(notAllowedTypesInHome)
This commit is contained in:
parent
363867570d
commit
9192ba2216
|
@ -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_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
|
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
|
# header
|
||||||
homeHeaderType = "text" # text, img, slide
|
homeHeaderType = "text" # text, img, slide
|
||||||
|
|
||||||
|
@ -266,7 +269,6 @@ showPoweredBy = true # show footer text: Powered by Hugo and Zzo theme
|
||||||
showFeedLinks = true # RSS Feed
|
showFeedLinks = true # RSS Feed
|
||||||
showSocialLinks = true # email, facebook, twitter ...
|
showSocialLinks = true # email, facebook, twitter ...
|
||||||
enableLangChange = true # show button at bottom left of footer.
|
enableLangChange = true # show button at bottom left of footer.
|
||||||
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
|
|
||||||
|
|
||||||
# service
|
# service
|
||||||
baiduAnalytics = "" # alternative of google analytics
|
baiduAnalytics = "" # alternative of google analytics
|
||||||
|
|
|
@ -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_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
|
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
|
# header
|
||||||
homeHeaderType = "text" # text, img, slide
|
homeHeaderType = "text" # text, img, slide
|
||||||
|
|
||||||
|
@ -260,7 +263,6 @@ showPoweredBy = true # show footer text: Powered by Hugo and Zzo theme
|
||||||
showFeedLinks = true # RSS Feed
|
showFeedLinks = true # RSS Feed
|
||||||
showSocialLinks = true # email, facebook, twitter ...
|
showSocialLinks = true # email, facebook, twitter ...
|
||||||
enableLangChange = true # show button at bottom left of footer.
|
enableLangChange = true # show button at bottom left of footer.
|
||||||
themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme
|
|
||||||
|
|
||||||
# service
|
# service
|
||||||
baiduAnalytics = "" # alternative of google analytics
|
baiduAnalytics = "" # alternative of google analytics
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
|
publishDate: {{ .Date }}
|
||||||
description:
|
description:
|
||||||
tags:
|
tags:
|
||||||
-
|
-
|
||||||
|
|
|
@ -261,6 +261,11 @@
|
||||||
li {
|
li {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-bottom: calc(1rem / 2);
|
margin-bottom: calc(1rem / 2);
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 3px 5px;
|
||||||
|
margin: 0 0.25rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,9 +13,13 @@
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<div class="summary__container">
|
<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 }}
|
{{ range $paginator.Pages }}
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div> {{ partial "pagination/pagination" . }}
|
</div> {{ partial "pagination/pagination" . }}
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in New Issue