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_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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
publishDate: {{ .Date }}
|
||||
description:
|
||||
tags:
|
||||
-
|
||||
|
|
|
@ -261,6 +261,11 @@
|
|||
li {
|
||||
margin-left: 2rem;
|
||||
margin-bottom: calc(1rem / 2);
|
||||
|
||||
code {
|
||||
padding: 3px 5px;
|
||||
margin: 0 0.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue