aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hugo-pt2021/layouts/_default')
-rw-r--r--themes/hugo-pt2021/layouts/_default/index.xml6
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 -}}