How To Create multiple sitemap

Hi , is it possible to have multiple sitemap on hugo ? like sitemap.xml , sitemap-video.xml,sitemap-image.xml
If yes can you please teach me how to make it

I haven’t tried that but you can probably create a sitemap-video.xml in layouts/_default/.

Then in your config.toml add something like:

[outputs]
  home = ["HTML", "SitemapVideo"]

[outputFormats]
  [outputFormats.SitemapVideo]
    name = "SitemapVideo"
    mediaType = "application/xml"
    baseName = "sitemap-video"

Note: Again, I haven’t tried it so it could be wrong but you could give it a try.

For what you should put in your layouts/_default/sitemap-video.xml, just copy what is in sitemap.xml and then adjust it to your needs.

Also check: https://gohugo.io/templates/sitemap-template/

:slight_smile:

I use a home sitemap and section sitemaps,

here my sample templates

HTH