Browse Source

let RSS show the full content

max.mehl 5 months ago
parent
commit
8c1c4be60e
No account linked to committer's email address
1 changed files with 28 additions and 0 deletions
  1. 28
    0
      themes/hugo-sustain/layouts/_default/rss.xml

+ 28
- 0
themes/hugo-sustain/layouts/_default/rss.xml View File

@@ -0,0 +1,28 @@
1
+{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
2
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
3
+  <channel>
4
+    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
5
+    <link>{{ .Permalink }}</link>
6
+    <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
7
+    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
8
+    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
9
+    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
10
+    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
11
+    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
12
+    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
13
+    {{ with .OutputFormats.Get "RSS" }}
14
+        {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
15
+    {{ end }}
16
+    {{ range .Pages }}
17
+    <item>
18
+      <title>{{ .Title }}</title>
19
+      <link>{{ .Permalink }}</link>
20
+      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
21
+      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
22
+      <guid>{{ .Permalink }}</guid>
23
+      <description>{{ .Summary | html }}</description>
24
+      <content:encoded>{{ .Content | html }}</content:encoded>
25
+    </item>
26
+    {{ end }}
27
+  </channel>
28
+</rss>

Loading…
Cancel
Save