summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
committerNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
commitf62eaded157e026d92077a18f8211b64a30fdc436188f19d32e089244d3c4c20 (patch)
treec5cdd4df132fa857611dde1a5bcc5c022483dc052860492c92a525ba5f3d1d0e
parent882b947ae8ad1b9b3fc4ccf39cc158c2f53d280dc2d9e39de6965bdf7b4ec5a8 (diff)
downloadhugo-theme-journal-f62eaded157e026d92077a18f8211b64a30fdc436188f19d32e089244d3c4c20.tar.gz
hugo-theme-journal-f62eaded157e026d92077a18f8211b64a30fdc436188f19d32e089244d3c4c20.zip
Don't convert time to UTC in Atom feeds
The entry archetype already wipes the time of day of entries and converts their dates to UTC, for the sake of user privacy. If the user overrides this behavior and purposely includes times and/or time zones, the theme should not interfere.
-rw-r--r--layouts/index.atom.xml4
-rw-r--r--layouts/index.gemini_atom.xml4
-rw-r--r--layouts/taxonomy/taxonomy.atom.xml4
-rw-r--r--layouts/taxonomy/taxonomy.gemini_atom.xml4
-rw-r--r--layouts/term/term.atom.xml4
-rw-r--r--layouts/term/term.gemini_atom.xml4
6 files changed, 12 insertions, 12 deletions
diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml
index 6c3a111..62df481 100644
--- a/layouts/index.atom.xml
+++ b/layouts/index.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/index.gemini_atom.xml b/layouts/index.gemini_atom.xml
index a6abebc..09e2bc1 100644
--- a/layouts/index.gemini_atom.xml
+++ b/layouts/index.gemini_atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>
diff --git a/layouts/taxonomy/taxonomy.atom.xml b/layouts/taxonomy/taxonomy.atom.xml
index 9ceeb79..4ef94d6 100644
--- a/layouts/taxonomy/taxonomy.atom.xml
+++ b/layouts/taxonomy/taxonomy.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/taxonomy/taxonomy.gemini_atom.xml b/layouts/taxonomy/taxonomy.gemini_atom.xml
index 5eadc00..60bc51b 100644
--- a/layouts/taxonomy/taxonomy.gemini_atom.xml
+++ b/layouts/taxonomy/taxonomy.gemini_atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>
diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml
index 9ceeb79..4ef94d6 100644
--- a/layouts/term/term.atom.xml
+++ b/layouts/term/term.atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}atom.xml" rel="self" />
<link href="{{ .Permalink }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink }}</id>
<title type="html">{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink }}" />
<content type="html">{{ .Content | html }}</content>
</entry>{{ end }}
diff --git a/layouts/term/term.gemini_atom.xml b/layouts/term/term.gemini_atom.xml
index e02d2fe..7afe36e 100644
--- a/layouts/term/term.gemini_atom.xml
+++ b/layouts/term/term.gemini_atom.xml
@@ -34,7 +34,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Site.Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)/index.gmi$` "gemini://$1/atom.xml" | safeURL }}" rel="self" />
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
{{- with $authorName }}
@@ -49,7 +49,7 @@
<entry>
<id>{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" }}</id>
<title>{{ .Title }}</title>
- <updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `^https://(.*)index.gmi$` "gemini://$1" | safeURL }}" rel="alternate" />
</entry>{{ end }}
</feed>