Add relation tags for syndication

This commit is contained in:
JP Hastings-Spital 2023-11-01 08:23:03 +00:00
parent 111f2e7a53
commit 7b195b80c8

View file

@ -10,7 +10,7 @@
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
{{- printf "<?xml-stylesheet href=\"/rss.xsl\" type=\"text/xsl\"?>" | 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" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink | absURL }}</link>
@ -30,20 +30,22 @@
<link>{{ .Permalink | absURL }}</link>
{{ if .Page.Params.Audio }}<enclosure url="{{ .Permalink | absURL }}{{ .Page.Params.Audio }}" length="{{ (os.Stat (path.Join .File.Dir .Page.Params.Audio)).Size }}" type="audio/mpeg" />{{end}}
<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>{{ .Permalink | absURL }}</guid>
<description>
{{- with index .Params.Media 0 }}
<img src="{{ path.Join $page.RelPermalink . | absURL }}" />
{{ end -}}
{{- .Summary -}}
&lt;img src="{{ path.Join $page.RelPermalink . | absURL }}" /&gt;
{{- end }}
{{ .Summary | html }}
</description>
<content:encoded>
{{- range $i, $src := .Params.Media }}
<img src="{{ path.Join $page.RelPermalink $src | absURL }}" />
{{ end -}}
{{- .Content | html -}}
&lt;img src="{{ path.Join $page.RelPermalink $src | absURL }}" /&gt;&lt;br/&gt;
{{- end }}
{{ .Content | html }}
</content:encoded>
{{- range .Params.syndications}}
<dc:relation>{{ . }}</dc:relation>
{{- end }}
</item>
{{ end }}
</channel>