Apply page limit after page selection

This commit is contained in:
Will Faught
2023-09-20 22:53:53 -07:00
parent 9f81fbcd50
commit ceeda23750

View File

@@ -4,12 +4,12 @@
{{ $pages := (cond $page.IsHome site $page).RegularPages }}
{{ $title := partial "paige/title.html" $page }}
{{ $pages = where $pages "Params.paige.feed.hide_page" "ne" true }}
{{ if ge $limit 0 }}
{{ $pages = $pages | first $limit }}
{{ end }}
{{ $pages = where $pages "Params.paige.feed.hide_page" "ne" true }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>