diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 8a2faf00..449f08db 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,16 +1,16 @@ {{- $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 }} +{{- 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 }} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} @@ -42,12 +42,12 @@ {{ .Permalink }} {{ .Summary | html }} {{ range ( where .Site.RegularPages ".RelPermalink" .RelPermalink | first 1 ) }} - {{- $images := .Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{- with $featured -}} - - {{- end -}} + {{- $images := .Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- with $featured -}} + + {{- end -}} {{ end }} {{ end }}