Parameterize the number of posts to return in the latest-page-summary shortcode

This commit is contained in:
Eryn Wells 2024-10-20 09:15:43 -07:00
parent 115b9dd9cd
commit 8aaea57a2e

View file

@ -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 }}