small fixes

This commit is contained in:
teldra 2022-04-05 13:55:26 +02:00
parent 07a0767140
commit 1dcc4a11f7
3 changed files with 1 additions and 40 deletions

View File

@ -1,14 +0,0 @@
---
title: "asd"
date: 2022-04-05T12:49:11+02:00
newscategories: []
eventcategories: []
when: ""
featured: false
covid: ""
contact: ""
price: ""
draft: false
tags: []
---
asdasd

View File

@ -1,14 +0,0 @@
---
title: "wwww"
date: 2022-04-05T13:31:27+02:00
newscategories: []
eventcategories: []
when: ""
featured: false
covid: ""
contact: ""
price: ""
draft: false
tags: []
---
wwwwwww

View File

@ -56,27 +56,16 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}-{{ $hash }}</guid>
<description>
{{ $updated := "" }}
{{ if gt .Lastmod.Unix .Date.Unix }}
{{ .Lastmod.Unix }}
{{ .Date.Unix }}
{{ $updated = i18n "updated" }}
{{ end }}
{{- $c := .Content -}}
{{- $c := replace $c "<img" "<img width=\"600\"" -}}
{{- if $when -}}
{{- $c = printf "<p>%s</p>%s" $when $c -}}
{{- end -}}
{{- if ne $updated "" -}}
{{- $c = printf "<p>%s</p>%s" $updated $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 -}}
{{ else }}
{{- else -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
{{- end -}}
</description>