Creating a simple Sitemap for Github Pages (Jekyll) powered site

31 May 2019 Tutorial #github pages #jekyll #sitemap

Today I decided to create a simple sitemap for my blog and upload it to Google Search Console. I opened WebStorm, pulled changes from GitHub and created a new file named sitemap.xml in blog root directory.

I found a sitemap protocol documentation and created something that looks like sitemap using built-in Jekyll language - Liquid.

<urlset xmlns="">

    {% for post in site.posts %}
        <lastmod>{{ | date_to_xmlschema}}</lastmod>
    {% endfor %}

It can be extended by adding subpages etc.