I have been using the following custom sitemap template for my site.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range .Data.Pages }}
<url>
<loc>{{ .Permalink }}</loc>
</url>
{{ end }}
</urlset>
Basically the only thing I want in my sitemap is the <loc>
node.
I started translating my site content to English and since I added a new language, Hugo creates the following sitemap files
/sitemap.xml
/fa/sitemap.xml
/en/sitemap.xml
/sitemap.xm
l points to the other two files that list the pages for each language. But this /sitemap.xml
adds a <lastmod>
node which I do not want and I don’t seem to find a way to provide a custom template for this. Here is the content for /sitemap.xml:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.mysite.com/fa/sitemap.xml</loc>
<lastmod>2016-08-29T00:00:00+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://www.mysite.com/en/sitemap.xml</loc>
<lastmod>2017-03-14T00:00:00+00:00</lastmod>
</sitemap>
</sitemapindex>
Is this at all possible?
Hugo v0.18.1