Trying out new RSS feed template

This commit is contained in:
Brandon Rozek 2022-05-05 14:19:44 -04:00
parent f42ea6bf95
commit becc01ac38
2 changed files with 186 additions and 0 deletions

File diff suppressed because one or more lines are too long

View file

@ -6,10 +6,13 @@
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
{{- $style := resources.Get "css/pretty-feed-v3.xsl" -}}
{{- printf "<?xml-stylesheet href=\"%s\" type=\"text/xsl\"?>" $style.Permalink | safeHTML }}
<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>{{ .Permalink }}</link>
<image>{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}</image>
<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 }}