-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap-blog.xml
23 lines (23 loc) · 1.04 KB
/
sitemap-blog.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
layout: null
---
<?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">
{% assign sortedPostsDe = site.categories.de | where: 'published', true | sort: 'path', 'last' | reverse %}
{% assign sortedPostsEn = site.categories.en | where: 'published', true | sort: 'path', 'last' | reverse %}
{% for postDe in sortedPostsDe %}
{% assign postEn = sortedPostsEn[forloop.index0] %}<!-- {{ postDe.title | xml_escape }} -->
<url>
<loc>{{ site.url }}{{ postDe.url }}</loc>
<priority>0.5</priority>
<xhtml:link rel="alternate" hreflang="en" href="{{ site.url }}{{ postEn.url }}" />
<xhtml:link rel="alternate" hreflang="de" href="{{ site.url }}{{ postDe.url }}" />
</url>
<url>
<loc>{{ site.url }}{{ postEn.url }}</loc>
<priority>0.5</priority>
<xhtml:link rel="alternate" hreflang="de" href="{{ site.url }}{{ postDe.url }}" />
<xhtml:link rel="alternate" hreflang="en" href="{{ site.url }}{{ postEn.url }}" />
</url>
{% endfor %}
</urlset>