Custom sitemap.xml


We have been trying to set up the customized sitemap.xml. We’ve followed the instructions from but nothing seems to make it work. It always says that “error on line 2 at column 1: Document is empty” / “error on line 2 at column 6: XML declaration allowed only at the start of the document hugo”.

The default .xml file ( is giving the urls only in “/”, “/blog” etc. but google doesn’t understand those and they should be set as a whole url.

Could any1 help me with this issue?

for getting help you should shar a repository :wink:

you can check my sample repo here, working sitemaps per sections

look in config.toml and themes\photon\layouts_default