diff options
Diffstat (limited to 'themes')
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/index.xml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/themes/hugo-pt2021/layouts/_default/index.xml b/themes/hugo-pt2021/layouts/_default/index.xml index aaa9fdb..ade0515 100644 --- a/themes/hugo-pt2021/layouts/_default/index.xml +++ b/themes/hugo-pt2021/layouts/_default/index.xml @@ -7,16 +7,18 @@ URL: Changes: * changed ".Summary | html" to ".Content | htmlEscape" * changed "Recent content on" to "Recent posts on" +* add default limit of 15 (hard-coded for now because $limit appears to + be busted */}} {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- $pages := slice -}} {{- if or $.IsHome $.IsSection -}} - {{- $pages = where $pctx.RegularPages "Section" "posts" -}} + {{- $pages = where $pctx.RegularPages "Section" "posts" | first 15 -}} {{- else -}} {{- $pages = $pctx.Pages -}} {{- end -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- $limit := default 15 .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} |