rss.xml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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">
  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.Language.Lang }}
  8. <language>{{.}}</language>{{end}}{{ with $.Site.Params.email }}
  9. <managingEditor>{{.}}{{ with $.Site.Params.myname }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.email }}
  10. <webMaster>{{.}}{{ with $.Site.Params.myname }} ({{.}}){{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. {{ if .IsHome }}
  17. {{ range .Site.RegularPages }}
  18. <item>
  19. <title>{{ .Title }}</title>
  20. <link>{{ .Permalink }}</link>
  21. <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
  22. {{ with .Site.Params.email }}<author>{{.}}{{ with $.Site.Params.myname }} ({{.}}){{end}}</author>{{end}}
  23. <guid>{{ .Permalink }}</guid>
  24. <description>{{ .Summary | html }}</description>
  25. </item>
  26. {{ end }}
  27. {{ else }}
  28. {{ range .Pages }}
  29. <item>
  30. <title>{{ .Title }}</title>
  31. <link>{{ .Permalink }}</link>
  32. <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
  33. {{ with .Site.Params.email }}<author>{{.}}{{ with $.Site.Params.myname }} ({{.}}){{end}}</author>{{end}}
  34. <guid>{{ .Permalink }}</guid>
  35. <description>{{ .Summary | html }}</description>
  36. </item>
  37. {{ end }}
  38. {{ end }}
  39. </channel>
  40. </rss>