I raised this issue a while back, but someone has now put what I was explaining into words. The code in the issue now formats the multilingual sitemaps properly (and I hope the pull request by Joe will do the same). cc @idarek
Such a simple fix. Just copying and pasting this section of code into the custom sitemap template.
I commented there, but adding here as well:
The default sitemap template for sitemap.xml in Hugo contain
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
Changing it just to
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/TR/xhtml11/xhtml11_schema.html">
adding the way of displaying sitemaps in subfolders exactly like the root one.
As mentioned here:
but then Google Search Console will start complaining about Incorrect namespace.
Firstly it’s better to think if we need to fix that. I don’t think we need it. Google search engines are reading these files, not users. I understand that users may want to preview that, but overall I am sticking with defaults.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.