mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
tplimpl: Output xmlns:xhtml only if there are translations available
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
384a6ac4bd
commit
0859d9dfe6
@@ -87,8 +87,8 @@ func (t *templateHandler) embedTemplates() {
|
|||||||
</channel>
|
</channel>
|
||||||
</rss>`)
|
</rss>`)
|
||||||
|
|
||||||
t.addInternalTemplate("_default", "sitemap.xml", `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
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">
|
xmlns:xhtml="http://www.w3.org/1999/xhtml"{{ end }}>
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||||
|
Reference in New Issue
Block a user