Permalink
Browse files

tplimpl: Output xmlns:xhtml only if there are translations available

  • Loading branch information...
jamieconnolly authored and bep committed Oct 3, 2017
1 parent 384a6ac commit 0859d9dfe647db3b8a192da38ad7efb5480a29a1
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 }}

0 comments on commit 0859d9d

Please sign in to comment.