mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
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
1 changed files with 2 additions and 2 deletions
|
@ -34,9 +34,9 @@
|
|||
<description>
|
||||
{{- $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 }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
||||
|
|
Loading…
Reference in a new issue