From a3e6519ed56d407137a5e10c04ba493a0b5f3fce Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Fri, 9 Dec 2022 23:11:01 +0100 Subject: [PATCH] update sitemap layout (added default values) --- layouts/sitemap.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index a44870a..2b3b48a 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -3,9 +3,9 @@ {{ range .Data.Pages }} {{ .Permalink }}{{ if not .Lastmod.IsZero }} - {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} - {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} - {{ .Sitemap.Priority }}{{ end }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ else }}{{ .Site.LastChange }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ else }}monthly{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ else }}0.5{{ end }} {{ end }}