To generate a sitemap you need to do the following:

  • Create a markdown file called like this:
title: sitemap
layout: sitemap
changefreq: monthly
priority: 1.0
saveas: sitemap.xml
  • Provide a sitemap.html in the _layouts directory, with looking something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="{{ this.xmlns }}">
{% for t in site.reflinks %}
    {% if site.reflinks[t].fn and not site.reflinks[t].hidden %}
        <loc>{{ site.hostname }}{{ site.reflinks[t].url }}</loc>
        <changefreq>{{ this.changefreq }}</changefreq>
        <priority>{{ this.priority }}</priority>
    {% endif %}
{% endfor %}

What makes this work is for the main part the saveas parameter in the file, which overrides the default output filename with sitemap.xml instead of sitemap.html