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
|
||||
# oneHeadingSize = false
|
||||
|
||||
# list recent posts in the home page; default is true
|
||||
# listRecentInHome = false
|
||||
|
||||
[params.twitter]
|
||||
# set Twitter handles for Twitter cards
|
||||
# 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
|
||||
fullWidthTheme = false
|
||||
centerTheme = false
|
||||
listRecentInHome = false
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
|
@ -4,7 +4,7 @@
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
{{ $PageContext := . }}
|
||||
{{ if .IsHome }}
|
||||
{{ if and .IsHome (not (eq $.Site.Params.listRecentInHome false)) }}
|
||||
{{ $PageContext = .Site }}
|
||||
{{ end }}
|
||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user