diff options
author | cntrump <cntrump@gmail.com> | 2020-11-07 04:03:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-07 04:03:26 +0300 |
commit | 5fb318ad5915aa17a36605856e6fe1e7325b25af (patch) | |
tree | 490102cfa3e99698684299557d87d7e3b5fcfa05 | |
parent | 693cfb739de100234d6b38910589ca004ffafeea (diff) | |
parent | 9f64cb6cd460cd4b889934af4e04e4130c12e01f (diff) |
Merge pull request #103 from liuwentao/master
fix rss output
-rw-r--r-- | layouts/_default/rss.xml | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index f0d19d9..3163560 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,8 +1,7 @@ -{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }} -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> - <link>{{ .RelPermalink }}</link> + <link>{{ .Permalink }}</link> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} @@ -11,20 +10,17 @@ <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{ with .OutputFormats.Get "RSS" }} - {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .RelPermalink .MediaType | safeHTML }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ end }} - {{ range .Pages }} + {{ range first 10 .Site.RegularPages }} <item> <title>{{ .Title }}</title> - <link>{{ .RelPermalink }}</link> + <link>{{ .Permalink }}</link> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} - <guid>{{ .RelPermalink }}</guid> - <description>{{ .Summary | html }}</description> - {{ if and (isset .Site.Params "fullrss") (.Site.Params.fullrss) }} - <content:encoded>{{ `<![CDATA[` | safeHTML }}{{ .Content | safeHTML }}{{ `]]>` | safeHTML }}</content:encoded> - {{ end }} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> </item> {{ end }} </channel> -</rss> +</rss>
\ No newline at end of file |