From 6343452a62ba1135a6d80f1050503f5822ac08b3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 27 Oct 2024 10:05:35 -0600 Subject: [PATCH] Exclude drafts from the latest widget --- layouts/shortcodes/home/latest.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/home/latest.html b/layouts/shortcodes/home/latest.html index db28124..afb94d8 100644 --- a/layouts/shortcodes/home/latest.html +++ b/layouts/shortcodes/home/latest.html @@ -1,8 +1,8 @@ {{- $blogSection := site.GetPage "blog" -}} -{{- $latestBlogPosts := $blogSection.RegularPagesRecursive.ByDate.Reverse.Limit 2 -}} +{{- $latestBlogPosts := (where $blogSection.RegularPagesRecursive "Draft" "eq" false).ByDate.Reverse.Limit 2 -}} {{- $photosSection := site.GetPage "photos" -}} -{{- $latestPhotoPosts := $photosSection.RegularPagesRecursive.ByDate.Reverse.Limit 4 -}} +{{- $latestPhotoPosts := (where $photosSection.RegularPagesRecursive "Draft" "eq" false).ByDate.Reverse.Limit 4 -}}
{{ range $latestBlogPosts -}}