small fixes

This commit is contained in:
teldra 2022-04-03 22:01:57 +02:00
parent 7b3ae2faad
commit 44ec3ceb55
1 changed files with 1 additions and 1 deletions

View File

@ -36,12 +36,12 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>
{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}
{{ $img := index (.Resources.ByType "image") 0 }}
{{ with $img }}
{{ $img := .Resize "640x" }}
{{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
{{ end }}
{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}
</description>
</item>