Fixing up feeds

This commit is contained in:
Brandon Rozek 2023-01-20 12:32:11 -05:00
parent 0ef524a9f3
commit de907bfa1d
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
3 changed files with 8 additions and 6 deletions

View file

@ -100,7 +100,7 @@ This file is in BETA. Please test and contribute to the discussion:
</xsl:attribute> </xsl:attribute>
<img> <img>
<xsl:attribute name="src"> <xsl:attribute name="src">
<xsl:value-of select="/rss/channel/image"/> <xsl:value-of select="/rss/channel/image/url"/>
</xsl:attribute> </xsl:attribute>
<xsl:attribute name="title"> <xsl:attribute name="title">
<xsl:value-of select="/rss/channel/title"/> <xsl:value-of select="/rss/channel/title"/>

View file

@ -15,14 +15,12 @@
xml:base="{{ .Permalink }}"> xml:base="{{ .Permalink }}">
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<id>{{ .Permalink }}</id> <id>{{ .Permalink }}</id>
<image>{{ .Site.BaseURL }}img/{{ .Site.Params.avatar }}</image>
<description>{{ .Description }}</description>
<generator uri="https://gohugo.io">Hugo</generator> <generator uri="https://gohugo.io">Hugo</generator>
<author> <author>
<uri>{{ .Site.BaseURL }}</uri> <uri>{{ .Site.BaseURL }}</uri>
{{ with .Site.Author.name }}<name>{{.}}</name>{{end}} {{ with .Site.Author.name }}<name>{{.}}</name>{{end}}
</author> </author>
<updated>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</updated> <updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
{{ with .OutputFormats.Get "Atom" }} {{ with .OutputFormats.Get "Atom" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }} {{ end }}

View file

@ -12,7 +12,11 @@
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<image>{{ .Site.BaseURL }}img/{{ .Site.Params.avatar }}</image> <image>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<url>{{ .Site.BaseURL }}img/{{ .Site.Params.avatar }}</url>
</image>
<description>{{ .Description }}</description> <description>{{ .Description }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
@ -30,7 +34,7 @@
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <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}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
{{ printf `<description type="html"><![CDATA[%s]]></description>` .Content | safeHTML }} {{ printf `<description><![CDATA[%s]]></description>` .Content | safeHTML }}
{{ range .Param "tags" }}<category>{{ . }}</category> {{ range .Param "tags" }}<category>{{ . }}</category>
{{ end }} {{ end }}
</item> </item>