diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b4d2a6b..3a89fba 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -16,6 +16,10 @@ {{- $allCss := slice $base $header $home $pagination $footer | resources.Concat "css/all.css" | fingerprint | minify -}} + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + {{ $title }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..a69b0b2 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,41 @@ +{{- $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 or (eq .Title .Site.Title) (eq .Title "Home") }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + 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 "2006-01-02" | safeHTML }}{{ end }}{{- with .OutputFormats.Get "RSS" -}}{{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + {{ if ( ne .Section "docs" ) }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "2006-01-02" | safeHTML }} + {{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{end}} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end }} + {{ end }} + + diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index f6bf6c9..b3e4863 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -2,6 +2,7 @@