Add param 'hiddenInHomeList' to hide certain post from home page

Usage =>
---
title: post name
hiddenInHomeList: true
---
This commit is contained in:
Aditya Telange 2022-08-20 14:31:07 +05:30
parent 198a4d74ae
commit b906338dc8
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@
{{- if .IsHome }}
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
{{- end }}
{{- $paginator := .Paginate $pages }}