Skip to content

Commit b1f9ba6

Browse files
committed
Add formatted sitemap template - non-minified version
1 parent 6e43c12 commit b1f9ba6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
3+
xmlns:xhtml="http://www.w3.org/1999/xhtml">
4+
{{ range .Data.Pages }}
5+
<url>
6+
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
7+
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
8+
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
9+
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
10+
</url>
11+
{{ end }}
12+
</urlset>

0 commit comments

Comments
 (0)