Skip to content

Commit

Permalink
Add param 'hiddenInHomeList' to hide certain post from home page
Browse files Browse the repository at this point in the history
Usage =>
---
title: post name
hiddenInHomeList: true
---
  • Loading branch information
adityatelange committed Aug 20, 2022
1 parent 198a4d7 commit b906338
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h1>

{{- if .IsHome }}
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
{{- end }}

{{- $paginator := .Paginate $pages }}
Expand Down

0 comments on commit b906338

Please sign in to comment.