-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.xml
41 lines (40 loc) · 1.59 KB
/
sitemap.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
permalink: "/sitemap.xml"
layout:
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd">
{% for post in site.posts %}
{% if post.id contains "404" %}{% else %}
{% if post.title %}
<url>
<loc>{{site.url}}{{ post.url }}</loc>
{% if page.ref %}
{% assign versions=site.posts | where:"ref", post.ref %}
{% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{site.url}}{{ version.url }}" />
{% endfor %}
{% endif %}
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
</url>
{% endif %}
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.id contains "404" %}{% else %}
{% if page.title %}
<url>
<loc>{{site.url}}{{ page.url }}</loc>
{% if page.ref %}
{% assign versions=site.pages | where:"ref", page.ref %}
{% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{site.url}}{{ version.url }}" />
{% endfor %}
{% endif %}
<changefreq>weekly</changefreq>
</url>
{% endif %}
{% endif %}
{% endfor %}
</urlset>