summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorJamie Connolly <jamie@jamieconnolly.com>2017-10-03 14:31:12 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-10-03 23:46:18 +0200
commit0859d9dfe647db3b8a192da38ad7efb5480a29a1 (patch)
tree2ff780761c5193060aa36970e285a50775c9eeb6 /tpl
parent384a6ac4bd2de16fcd6a1c952e7ca41b66023a12 (diff)
tplimpl: Output xmlns:xhtml only if there are translations available
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template_embedded.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go
index dd3254560..dfabcbe11 100644
--- a/tpl/tplimpl/template_embedded.go
+++ b/tpl/tplimpl/template_embedded.go
@@ -87,8 +87,8 @@ func (t *templateHandler) embedTemplates() {
</channel>
</rss>`)
- t.addInternalTemplate("_default", "sitemap.xml", `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
- xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ t.addInternalTemplate("_default", "sitemap.xml", `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"{{ if .IsTranslated }}
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"{{ end }}>
{{ range .Data.Pages }}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}