diff options
author | tdro <tdro@noreply.example.com> | 2022-06-16 16:42:17 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-16 16:42:17 -0400 |
commit | f8edb8e8ab98d4d429f71b37c03a49654b976465 (patch) | |
tree | 76e972c5df4c292351de795d90fee31fed998f78 /assets/templates | |
parent | 575f2c07583b4a05b40bc829e83e77891c27f12f (diff) | |
download | canory-f8edb8e8ab98d4d429f71b37c03a49654b976465.tar.gz canory-f8edb8e8ab98d4d429f71b37c03a49654b976465.tar.bz2 canory-f8edb8e8ab98d4d429f71b37c03a49654b976465.zip |
assets/templates/markdown-feed: Guard against enclosures that are not images
Other enclosure types can be handled differently.
Diffstat (limited to 'assets/templates')
-rw-r--r-- | assets/templates/markdown-feed.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/assets/templates/markdown-feed.yaml b/assets/templates/markdown-feed.yaml index 3e7d9a9..005d411 100644 --- a/assets/templates/markdown-feed.yaml +++ b/assets/templates/markdown-feed.yaml @@ -30,7 +30,21 @@ feed: {{- end }} {{ with .enclosure -}} +{{- if or + (in . "apng") + (in . "avif") + (in . "gif") + (in . "jfif") + (in . "jpeg") + (in . "jpg") + (in . "pjp") + (in . "pjpeg") + (in . "png") + (in . "svg") + (in . "webp") +-}} ![{{ $enclosureDescription }}]({{ . }} " {{ $enclosureDescription }}" ) +{{- end -}} {{- end }} |