Hi, so I figured out how to generate a second sitemap and Hugo outputs the file to the same directory as sitemap.xml (/public), but when I build the site and visit the URL http://localhost:1313/secondsitemap.xml I get a 404, but when I visit /sitemap.xml, the default map is there. What am I doing wrong here?
[outputs]
home = [ "HTML", "secondsitemap" ]
taxonomy = [ "HTML" ]
term = [ "HTML" ]
That key doesn’t want to be a separate file… not sure why. I’m guessing the restriction is related to the fact that you can also set “outputs” in the front matter of each content file.
This was the right answer but probably not for the reasons you cited. We have very complex Hugo site and we’ve broken out different aspects of our build into different build environments. I had placed this into the outputs for the wrong environment. Your answer helped me figure that out, so thank you!
Thanks for letting me know. I will have to go back and test again, because I couldn’t make that key work as its own file in the default configuration folder.