From 6b45c73bb4cc1a3d2c5c8e7d9f7e4298c7025353 Mon Sep 17 00:00:00 2001 From: verdant Date: Sat, 7 Feb 2026 15:00:30 +0800 Subject: chore: single pages in atom.xml will be ignored --- layouts/_default/rss.xml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 37ab6ea..e480a4b 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -34,14 +34,11 @@ {{- if .IsHome }}{{ $pctx = .Site }}{{ end }} {{- $pages := slice }} {{- if or $.IsHome $.IsSection }} -{{- $pages = $pctx.RegularPages }} +{{- $pages = where $pctx.RegularPages "Type" "in" (slice "posts" "post") }} {{- else }} -{{- $pages = $pctx.Pages }} -{{- end }} -{{- $limit := .Site.Params.RSS.pageLimit }} -{{- if ge $limit 1 }} -{{- $pages = $pages | first $limit }} +{{- $pages = where $pctx.Pages "Type" "in" (slice "posts" "post") }} {{- end }} + {{- printf "" | safeHTML }} @@ -82,4 +79,4 @@ {{- end }} - \ No newline at end of file + -- cgit v1.2.3