From bd8e03ba6113f544194ae5de7a098a1c6973d681 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Mon, 28 Sep 2020 16:12:52 +0200 Subject: [PATCH] fix(rss): remove featured image width height attr Throws error when featured image is not found inside page bundle. closes https://github.com/CaiJimmy/hugo-theme-stack/issues/20 --- layouts/rss.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/rss.xml b/layouts/rss.xml index 7ca03dd..178f997 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -34,9 +34,9 @@ {{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}} {{- if $image.exists -}} - {{ "<" | html }}img src="{{ $image.permalink | absURL }}" width="{{ $image.resource.Width }}" height="{{ $image.resource.Height }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}} + {{ "<" | html }}img src="{{ $image.permalink | absURL }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}} {{- end -}}{{ $content }} {{ end }} - \ No newline at end of file +