From e65a680b490e4a58875f3cd409025c21f3bd938d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 26 Oct 2024 08:30:44 -0600 Subject: [PATCH] Get blog and photos posts recursively in the latest widget Now that year sections are real sections, real pages (i.e. blog posts and photos) need to be fetched recursively. --- layouts/shortcodes/home/latest.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/home/latest.html b/layouts/shortcodes/home/latest.html index 41defbf..db28124 100644 --- a/layouts/shortcodes/home/latest.html +++ b/layouts/shortcodes/home/latest.html @@ -1,16 +1,16 @@ {{- $blogSection := site.GetPage "blog" -}} -{{- $latestBlogPosts := $blogSection.Pages.ByDate.Reverse.Limit 2 -}} +{{- $latestBlogPosts := $blogSection.RegularPagesRecursive.ByDate.Reverse.Limit 2 -}} {{- $photosSection := site.GetPage "photos" -}} -{{- $latestPhotoPosts := $photosSection.Pages.ByDate.Reverse.Limit 1 -}} +{{- $latestPhotoPosts := $photosSection.RegularPagesRecursive.ByDate.Reverse.Limit 4 -}}
- {{ range $latestBlogPosts }} + {{ range $latestBlogPosts -}}
{{ .Render "page_summary" }}
{{ end }} - {{ range $latestPhotoPosts }} + {{ range $latestPhotoPosts -}}
{{ .Render "page_summary" }}