don't write empty categories to rss

This commit is contained in:
John Bowdre 2023-12-30 17:08:31 -06:00
parent cb8e66fabe
commit 2642a29e26

View file

@ -35,10 +35,10 @@
<title>{{ .Title | plainify }}</title> <title>{{ .Title | plainify }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<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.Params.Author.name }}<dc:creator>{{.}}</dc:creator>{{end}} {{ with .Site.Params.Author.name }}<dc:creator>{{.}}</dc:creator>{{ end }}
<category>{{ .Params.series | lower }}</category> {{ with .Params.series }}<category>{{ . | lower }}</category>{{ end }}
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}
<category>{{ .LinkTitle }}</category>{{end}} <category>{{ .LinkTitle }}</category>{{ end }}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Summary | plainify }}</description> <description>{{ .Summary | plainify }}</description>
</item> </item>