summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-06-29 08:48:10 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-06-29 08:48:10 +0200
commite2a137accbce2f38f34646edfd289fd06478eae1 (patch)
treef78626c8df80c88a3f9ba9cc17290a4c34e146ee
parentde51f2763939553fdefe87ed18040f87f588176c (diff)
downloadgohugo-theme-ed-e2a137accbce2f38f34646edfd289fd06478eae1.tar.gz
Fix date format for sitemap
-rw-r--r--CHANGELOG.md1
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/sitemap.xml2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 068de15..55787d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Enable maskable icon support
- Rework term rendering for Atom feeds to not include duplicates
- Remove redundant `<aside>` tags around the post's ToC
+- Fix date format for sitemap.
## [v0.3.0](https://github.com/sergeyklay/gohugo-theme-ed/compare/v0.2.0...v0.3.0)
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index dd59415..b12ac61 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -27,7 +27,7 @@ refLinksErrorLevel = 'WARNING'
# kick out RSS, we'll use Atom and FEED bellow
disableKinds = ['RSS']
-# Google Analytics Tracking id
+# Google Analytics Tracking ID.
googleAnalytics = ''
[minify]
diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml
index 7b36746..3cba759 100644
--- a/layouts/_default/sitemap.xml
+++ b/layouts/_default/sitemap.xml
@@ -3,7 +3,7 @@
{{ range .Data.Pages }}{{ if ne .Params.private true }}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
- <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05Z07:00" | jsonify ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
+ <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05Z07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link