From 8aaea57a2e352d369bbbf294b9043dc549dae8a1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 20 Oct 2024 09:15:43 -0700 Subject: [PATCH] Parameterize the number of posts to return in the latest-page-summary shortcode --- layouts/shortcodes/latest-page-summary.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/latest-page-summary.html b/layouts/shortcodes/latest-page-summary.html index c954f10..f1be68d 100644 --- a/layouts/shortcodes/latest-page-summary.html +++ b/layouts/shortcodes/latest-page-summary.html @@ -1,4 +1,5 @@ {{- $section := site.GetPage (.Get "section") -}} -{{ range $section.Pages.ByDate.Reverse.Limit 1 }} +{{- $limit := .Get "limit" | default 1 -}} +{{ range $section.Pages.ByDate.Reverse.Limit $limit }} {{ .Render "page_summary" }} {{ end }}