Add cover images to RSS

main
Elnu 2 years ago
parent 2f51d21ee4
commit 64fc914be3

@ -33,6 +33,7 @@
{{ 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>
<description>{{ cond (isset .Params "description") .Params.description (.Summary | html) }}</description> <description>{{ cond (isset .Params "description") .Params.description (.Summary | html) }}</description>
{{ with .Resources.GetMatch "{cover.*,*.jpg,*.png,*.jpeg}" }}<enclosure url="{{ .Permalink }}" type="{{ .MediaType }}" />{{ end }}
</item> </item>
{{ end }} {{ end }}
</channel> </channel>