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

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="http://www.sitemaps.org/schemas/sitemap/0.9">

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

It can be extended by adding subpages etc.