From b906338dc82a48e0fa8c8d4160a09c8b07302472 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 20 Aug 2022 14:31:07 +0530 Subject: [PATCH] Add param 'hiddenInHomeList' to hide certain post from home page Usage => --- title: post name hiddenInHomeList: true --- --- layouts/_default/list.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5d6afc2f..3a6f316e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -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 }}