diff --git a/layouts/_default/index.atom.atom b/layouts/index.atom.atom similarity index 100% rename from layouts/_default/index.atom.atom rename to layouts/index.atom.atom diff --git a/layouts/_default/index.html b/layouts/index.html similarity index 100% rename from layouts/_default/index.html rename to layouts/index.html diff --git a/layouts/_default/index.rss.rss b/layouts/index.rss.rss similarity index 77% rename from layouts/_default/index.rss.rss rename to layouts/index.rss.rss index 8700ec3..1f4a0a9 100644 --- a/layouts/_default/index.rss.rss +++ b/layouts/index.rss.rss @@ -1,17 +1,20 @@ -{{- $pctx := . -}} +{{- $pageContext := . -}} {{- if .IsHome -}} - {{ $pctx = .Site }} + {{ $pageContext = .Site }} {{- end -}} + {{- $pages := slice -}} {{- if or $.IsHome $.IsSection -}} - {{- $pages = $pctx.RegularPages -}} + {{- $pages = $pageContext.RegularPages -}} {{- else -}} - {{- $pages = $pctx.Pages -}} + {{- $pages = $pageContext.Pages -}} {{- end -}} + {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} + {{- printf "" | safeHTML }} @@ -20,8 +23,10 @@ Recent content on {{ .Site.Title }} Hugo {{ hugo.Version }} -- gohugo.io {{ with .Site.LanguageCode }}{{ . }}{{ end }} - {{ with .Site.Author }}{{ .name }} <{{ .email }}>{{ end }} - {{ with .Site.Author.email }}{{ .name }} <{{ .email }}>{{ end }} + {{ with .Site.Author }} + {{ .name }} <{{ .email }}> + {{ .name }} <{{ .email }}> + {{ end }} {{ with .Site.Copyright }}{{ . }}{{ end }} {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{ with .OutputFormats.Get "RSS" }}{{ printf "" .Permalink .MediaType | safeHTML }}{{ end }}