Optionally disable listing recent items in homepage
This commit is contained in:
parent
58ba445c9f
commit
f9f9abd98f
@ -98,6 +98,9 @@ paginate = 5
|
|||||||
# it's set to `true` by default
|
# it's set to `true` by default
|
||||||
# oneHeadingSize = false
|
# oneHeadingSize = false
|
||||||
|
|
||||||
|
# list recent posts in the home page; default is true
|
||||||
|
# listRecentInHome = false
|
||||||
|
|
||||||
[params.twitter]
|
[params.twitter]
|
||||||
# set Twitter handles for Twitter cards
|
# set Twitter handles for Twitter cards
|
||||||
# see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution
|
# see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution
|
||||||
|
@ -9,6 +9,7 @@ paginate = 5
|
|||||||
showMenuItems = 2
|
showMenuItems = 2
|
||||||
fullWidthTheme = false
|
fullWidthTheme = false
|
||||||
centerTheme = false
|
centerTheme = false
|
||||||
|
listRecentInHome = false
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||||
|
|
||||||
{{ $PageContext := . }}
|
{{ $PageContext := . }}
|
||||||
{{ if .IsHome }}
|
{{ if and .IsHome (not (eq $.Site.Params.listRecentInHome false)) }}
|
||||||
{{ $PageContext = .Site }}
|
{{ $PageContext = .Site }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user