small fixes

This commit is contained in:
teldra 2022-04-05 13:58:27 +02:00
parent 1dcc4a11f7
commit 93c87a8100
1 changed files with 2 additions and 2 deletions

View File

@ -59,12 +59,12 @@
{{- $c := .Content -}}
{{- $c := replace $c "<img" "<img width=\"600\"" -}}
{{- if $when -}}
{{- $c = printf "<p>%s</p>%s" $when $c -}}
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
{{- end -}}
{{- $img := index (.Resources.ByType "image") 0 -}}
{{- with $img -}}
{{- $img := .Resize "640x" -}}
{{- printf "<![CDATA[%s<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}}
{{- printf "<![CDATA[%s<img src=\"%s\" width=\"%d\" height=\"%d\" />]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}}
{{- else -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
{{- end -}}