✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now


By Roberto Malcotti

This tool is designed to automatically generate a sitemap powered by Sanity CMS with also the need to manage multiple languages.

About the project


  • Fetches dynamic content types from Sanity CMS.
  • Generates a sitemap XML file compatible with search engine requirements.
  • Supports multilingual content for improved global SEO.


Before running the script, make sure to configure the following variables according to your specific requirements: Adjust these settings in the script to match the specifics of your website and CMS setup.


This should be set to the base URL of your website. Example: const baseUrl = 'https://www.example.com';


This array should include all the document types from your Sanity CMS that you want to include in the sitemap. Example: const docTypes = ["page", "business", "author", "blog", "event"];


Other projects by author


Efficient Go middleware for seamless document translation within Sanity.io via DeepL API integration.

Roberto Malcotti
Go to SanityTranslator


Valpiccola: Where Technology Celebrates Territorial Treasures!

Roberto Malcotti
Go to Valpiccola