diff options
| author | verdant <i@glowisle.me> | 2026-02-07 15:00:30 +0800 |
|---|---|---|
| committer | verdant <i@glowisle.me> | 2026-02-07 15:00:30 +0800 |
| commit | 6b45c73bb4cc1a3d2c5c8e7d9f7e4298c7025353 (patch) | |
| tree | 203fbd1bca1031cc1e24c615b4fe5a22f02eb94e /layouts/_default/rss.xml | |
| parent | e7465d33131d5986e868be3091d413703cd91c9c (diff) | |
| download | blog-6b45c73bb4cc1a3d2c5c8e7d9f7e4298c7025353.tar.gz blog-6b45c73bb4cc1a3d2c5c8e7d9f7e4298c7025353.zip | |
chore: single pages in atom.xml will be ignored
Diffstat (limited to 'layouts/_default/rss.xml')
| -rw-r--r-- | layouts/_default/rss.xml | 11 |
1 files changed, 4 insertions, 7 deletions
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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> @@ -82,4 +79,4 @@ </item> {{- end }} </channel> -</rss>
\ No newline at end of file +</rss> |
