blog/themes/chameleon/scripts/sitemap/.sitemap.xml

34 lines
774 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in posts %}
<url>
<loc>{{ post.permalink }}</loc>
{% if post.lastUpdated() %}
<lastmod>{{ post.lastUpdated() }}</lastmod>
{% elif post.date %}
<lastmod>{{ post.date }}</lastmod>
{% endif %}
</url>
{% endfor %}
{# home page #}
<url>
<loc>{{ config.url + config.root }}</loc>
<lastmod>{{ sNow }}</lastmod>
</url>
{# archive page #}
<url>
<loc>{{ config.url + '/' + archive_dir + '/' }}</loc>
<lastmod>{{ sNow }}</lastmod>
</url>
{# tag pages #}
{% for tag in tags %}
<url>
<loc>{{ tag.permalink }}</loc>
<lastmod>{{ sNow }}</lastmod>
</url>
{% endfor %}
</urlset>