From 0e222415efc45c885678745d9857ffc771049da2 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 13 Jun 2016 02:41:19 +0100 Subject: [PATCH] Add `notonhomepage` option to prevent a specific post being displayed on homepage --- layouts/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 2817e506..9c31f788 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -83,7 +83,7 @@ -{{ $posts_len := len (where .Data.Pages "Type" "post") }} +{{ $posts_len := len (where (where .Data.Pages "Type" "post") ".Params.notonhomepage" nil) }} {{ if gt $posts_len 0 }}
@@ -101,7 +101,7 @@ {{ end }}
- {{ range first .Site.Params.posts.count (where .Data.Pages "Type" "post") }} + {{ range first .Site.Params.posts.count (where (where .Data.Pages "Type" "post") ".Params.notonhomepage" nil) }}
{{ if .Params.image }}