diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-05-15 10:00:19 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-05-15 10:00:19 +0900 |
| commit | cd8447404c66a519a20cc3ce9f6fa23ba964fe37 (patch) | |
| tree | a32f84110f71944f9ab28e473ca9025b664fdbcd /themes/mypaper/layouts/sitemap.xml | |
| parent | e2d0028c1fbfb4cac59e20926e5aa0031e0ed607 (diff) | |
| download | nsfisis.github.io-cd8447404c66a519a20cc3ce9f6fa23ba964fe37.tar.gz nsfisis.github.io-cd8447404c66a519a20cc3ce9f6fa23ba964fe37.tar.zst nsfisis.github.io-cd8447404c66a519a20cc3ce9f6fa23ba964fe37.zip | |
remove time field from sitemap's <lastmod>
Diffstat (limited to 'themes/mypaper/layouts/sitemap.xml')
| -rw-r--r-- | themes/mypaper/layouts/sitemap.xml | 12 |
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> |
