diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index cad8d68d03..445be9c278 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,17 +1,15 @@ -{{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} -{{- $pages = $pctx.RegularPages -}} -{{- else -}} -{{- $pages = $pctx.Pages -}} -{{- end -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} -{{- if ge $limit 1 -}} -{{- $pages = $pages | first $limit -}} -{{- end -}} {{- printf "" | safeHTML }} {{- partial "page-meta.go" . }} +{{- $pages := .Page.Pages }} +{{- if .Page.IsHome }} + {{- $pages = .Page.Sections }} +{{- else if .Page.Sections}} + {{- $pages = (.Page.Pages | union .Page.Sections) }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 0 -}} + {{- $pages = $pages | first $limit -}} +{{- end }} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} @@ -26,17 +24,19 @@ {{- with .OutputFormats.Get "RSS" -}} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} - {{ range $pages }} - {{- if and .Permalink .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) }} + {{- range $pages }} + {{- if and .Permalink .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) }} {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{- with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{- end }} {{ .Permalink }} {{ .Summary | html }} {{- end }} - {{ end }} + {{- end }} \ No newline at end of file diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 63fe665792..aae5934b8e 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -109,11 +109,12 @@
  • {{- partial "menu-pre.html" . }}{{ or .Params.menuTitle .LinkTitle .Title }}{{ partial "menu-post.html" . }} {{- if $showvisitedlinks }}{{ end }}