From dc4b90db27b758ffcd4dcdb34c1c28c3380bc5aa Mon Sep 17 00:00:00 2001 From: Jeremiah Valenzuela Date: Mon, 31 Jul 2017 13:52:14 -0500 Subject: [PATCH] Replace old RSS template with new embedded version (#116) Current documentation shows an old version of the embedded RSS template. The newer version is in: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go This was copied and pasted into the documentation as embedded. --- content/templates/rss.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/content/templates/rss.md b/content/templates/rss.md index 21ba4bc9f..4d736c65e 100644 --- a/content/templates/rss.md +++ b/content/templates/rss.md @@ -84,24 +84,26 @@ This is the default RSS template that ships with Hugo. It adheres to the [RSS 2. ``` - {{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }} + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} - Recent content {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }} + 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 "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - - {{ range first 15 .Data.Pages }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Data.Pages }} {{ .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 | html }} + {{ .Summary | html }} {{ end }}