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
This commit is contained in:
parent
12578a5769
commit
bd8e03ba61
@ -34,7 +34,7 @@
|
|||||||
<description>
|
<description>
|
||||||
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
|
||||||
{{- if $image.exists -}}
|
{{- 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 }}</description>
|
{{- end -}}{{ $content }}</description>
|
||||||
</item>
|
</item>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user