aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/mypaper
diff options
context:
space:
mode:
Diffstat (limited to 'themes/mypaper')
-rw-r--r--themes/mypaper/layouts/sitemap.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/themes/mypaper/layouts/sitemap.xml b/themes/mypaper/layouts/sitemap.xml
new file mode 100644
index 0000000..74851b5
--- /dev/null
+++ b/themes/mypaper/layouts/sitemap.xml
@@ -0,0 +1,12 @@
+{{ 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 }}
+ {{- if .Permalink -}}
+ <url>
+ <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
+ <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02-07:00" ) }}</lastmod>{{ end }}
+ </url>
+ {{- end -}}
+ {{ end }}
+</urlset>