Debian Codegraph @

tpl/tplimpl/embedded/templates/sitemap.xml

raw
1 {{/* gotmplfmt-ignore-all */ -}}
2 {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
3 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
4 xmlns:xhtml="http://www.w3.org/1999/xhtml">
5 {{ range where .Pages "Sitemap.Disable" "ne" true }}
6 {{- if .Permalink -}}
7 <url>
8 <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
9 <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
10 <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
11 <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .AllTranslations }}
12 <xhtml:link
13 rel="alternate"
14 hreflang="{{ .Language.Locale }}"
15 href="{{ .Permalink }}"
16 />{{ end }}{{ end }}
17 </url>
18 {{- end -}}
19 {{ end }}
20 </urlset>