blob: 2104d393875203e9d3d5fa2a993450277f5366f0 (
plain) (
tree)
|
|
---
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{% for coll in site.all_collections %}
{% for page in site[coll] %}
{% comment %}
page ref is nil for generated pages, such
as post.html.1.txt code snippets
{% endcomment %}
{% if page.ref != nil %}
<url>
<loc>{{ site.url }}{{ page.url }}</loc>
{% assign ref=page.ref %}
{% if page.ref == 'root' %}
{% assign ref='index' %}
{% endif %}
{% assign versions=site[coll] | where:"ref", ref %}
{% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{ site.url }}{{ version.url }}" />
{% endfor %}
{% if page.date != nil %}
<lastmod>{{ page.updated_at | default: page.date | date_to_xmlschema }}</lastmod>
{% endif %}
<changefreq>monthly</changefreq>
</url>
{% endif %}
{% endfor %}
{% endfor %}
</urlset>
|