Merge pull request #107 from nunocoracao/105-add-featured-images-to-rss-feeds

add images to rss
This commit is contained in:
Nuno Coração 2022-10-15 12:57:36 +01:00 committed by GitHub
commit eea1e72d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,8 @@
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
<image url="{{ $featured.Permalink }}" />
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ $featured.Permalink }}" />
{{- end -}}
{{ end }}
</item>