aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/sitemap.xml
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
committertdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
commite92dc018e28ba8d44f1c6cbc9fb0b779dec271e6 (patch)
tree3667043819ab91065019dfe3b4ff83ad625c2b49 /themes/default/layouts/_default/sitemap.xml
downloadcanory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.gz
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.bz2
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.zip
config.yaml: Commission
Diffstat (limited to 'themes/default/layouts/_default/sitemap.xml')
-rw-r--r--themes/default/layouts/_default/sitemap.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/sitemap.xml b/themes/default/layouts/_default/sitemap.xml
new file mode 100644
index 0000000..63f5119
--- /dev/null
+++ b/themes/default/layouts/_default/sitemap.xml
@@ -0,0 +1,22 @@
+{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ {{ range .Data.Pages }}
+ <url>
+ <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
+ <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07: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
+ rel="alternate"
+ hreflang="{{ .Language.Lang }}"
+ href="{{ .Permalink }}"
+ />{{ end }}
+ <xhtml:link
+ rel="alternate"
+ hreflang="{{ .Language.Lang }}"
+ href="{{ .Permalink }}"
+ />{{ end }}
+ </url>
+ {{ end }}
+</urlset>