From 6487b1a1e1c2654db7dfb41d4ab555ba6f9008b8 Mon Sep 17 00:00:00 2001
From: teldra
Date: Tue, 5 Apr 2022 12:49:50 +0200
Subject: [PATCH] small fixes
---
content/news/2022-04-03-TanzBar/index.de.md | 14 +++++++++++++
themes/buha/i18n/de.toml | 5 ++++-
themes/buha/layouts/_default/rss.xml | 23 +++++++++++++++++----
3 files changed, 37 insertions(+), 5 deletions(-)
create mode 100644 content/news/2022-04-03-TanzBar/index.de.md
diff --git a/content/news/2022-04-03-TanzBar/index.de.md b/content/news/2022-04-03-TanzBar/index.de.md
new file mode 100644
index 00000000..20b25371
--- /dev/null
+++ b/content/news/2022-04-03-TanzBar/index.de.md
@@ -0,0 +1,14 @@
+---
+title: "asd"
+date: 2022-04-05T12:49:11+02:00
+newscategories: []
+eventcategories: []
+when: ""
+featured: false
+covid: ""
+contact: ""
+price: ""
+draft: false
+tags: []
+---
+asdasd
\ No newline at end of file
diff --git a/themes/buha/i18n/de.toml b/themes/buha/i18n/de.toml
index 1883ba0e..fa2794e4 100644
--- a/themes/buha/i18n/de.toml
+++ b/themes/buha/i18n/de.toml
@@ -71,4 +71,7 @@ other = "English"
other = "Kurdi"
[all]
-other = "Alle"
\ No newline at end of file
+other = "Alle"
+
+[updated]
+other = "Aktualisiert"
\ No newline at end of file
diff --git a/themes/buha/layouts/_default/rss.xml b/themes/buha/layouts/_default/rss.xml
index d3a755ca..6d9f81f0 100644
--- a/themes/buha/layouts/_default/rss.xml
+++ b/themes/buha/layouts/_default/rss.xml
@@ -56,15 +56,30 @@
{{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}
{{ .Permalink }}-{{ $hash }}
- {{- if $when -}}{{- $when | plainify -}}{{- end -}}
+ {{ $updated := "" }}
+ {{ if gt .Lastmod .Date }}
+ {{ $updated = i18n "updated" }}
+ {{ end }}
+ {{- if $when -}}
+ {{- $when = $when -}}
+ {{- end -}}
{{- $c := .Content -}}
{{- $c := replace $c "%s
%s" $when $c -}}{{- end -}}
+ {{- if $when -}}
+ {{- $c = printf "%s
%s" $when $c -}}
+ {{- end -}}
+
+ {{- if ne $updated "" -}}
+ {{- $c = printf "%s
%s" $updated $c -}}
+ {{- end -}}
+
{{- $img := index (.Resources.ByType "image") 0 -}}
{{- with $img -}}
- {{- $img := .Resize "640x" -}}
- {{- printf "]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}}
+ {{- $img := .Resize "640x" -}}
+ {{- printf "]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}}
+ {{ else }}
+ {{- printf "" $c | safeHTML -}}
{{- end -}}