{{- $pages := (where site.RegularPages "Section" .Section) -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} {{- $period := "daily" -}} {{- $mins := "1440" -}} {{- $title := .Section | humanize -}} {{- if eq .Section "notes" -}} {{- $period = "hourly" -}} {{- $mins = "60" -}} {{- end -}} {{- if .IsHome }} {{- $period := "hourly" -}} {{- $title = "All content" -}} {{- $pages = where .Site.RegularPages "Date" "!=" (time "0001-01-01") -}} {{- $mins = "60" -}} {{ end -}} {{- printf "" | safeHTML }} {{ $title }} on {{ .Site.Title }} {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} {{ $mins }} {{ $period }} 1 Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{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 }} {{ range $pages }} {{- .Page.Scratch.Set "codeIndex" 1 -}} {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{- .Content | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `` "" | html -}} {{ end }}