diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 7c5a3075a..0e5e0d0c0 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -2,11 +2,11 @@ {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- $pages := slice -}} {{- if $.IsHome -}} -{{- $pages = $pctx.RegularPages -}} +{{- $pages = sort $pctx.RegularPages "Date" "desc" -}} {{- else if $.IsSection -}} -{{- $pages = $pctx.RegularPagesRecursive -}} +{{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}} {{- else -}} -{{- $pages = $pctx.RegularPagesRecursive -}} +{{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}} {{- end -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}}