Generating a sitemap with Quarto


TL;DR: Set the website’s site-url property to generate a sitemap.xml file.


Albert Krewinkel


August 24, 2022

Sitemaps are an easy way to list all pages that a search engine should crawl and index. Quarto supports the standard, XML based Sitemap Protocol, although that fact is a bit hidden in the docs.

Quarto will automatically produce a sitemap if the website’s URL is given as site-url property:

  title: tarleb
  site-url: ''
  site-path: '/'

The URL will contain a colon :, which is why the YAML value must be put in quotes.

You’ll find the sitemap.xml file in your _site folder after re-rendering your pages with quarto render.