-
Notifications
You must be signed in to change notification settings - Fork 8
/
sitemap.xml
executable file
·103 lines (103 loc) · 3.58 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
layout: compress
sitemap:
exclude: true
---
<?xml version="1.0" encoding="UTF-8"?>
<!-- generated-on="{{ site.time | date_to_rfc822 }}" -->
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="https://www.google.com/schemas/sitemap-image/1.1">
{% for post in site.posts %}
{% unless post.published == false or post.sitemap.exclude %}
<url>
<loc>{{ site.url }}{{ post.url | remove: "index.html" }}</loc>
{% if post.sitemap.lastmod %}
<lastmod>{{ post.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif post.date %}
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
{% endif %}
{% if post.sitemap.changefreq %}
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
{% else %}
<changefreq>weekly</changefreq>
{% endif %}
{% if post.sitemap.priority %}
<priority>{{ post.sitemap.priority }}</priority>
{% else %}
<priority>0.4</priority>
{% endif %}
{% if post.image.url %}
{% include image4sitemap.html image=post.image.url %}
{% endif %}
{% if post.sitemap.images %}
{% for post_image in post.sitemap.images %}
{% include image4sitemap.html image=post_image %}
{% endfor %}
{% endif %}
</url>
{% endunless %}
{% endfor %}
{% for page in site.pages %}
{% unless page.sitemap.exclude %}
<url>
<loc>{{ site.url }}{{ page.url | remove: "index.html" }}</loc>
{% if page.sitemap.lastmod %}
<lastmod>{{ page.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif page.date %}
<lastmod>{{ page.date | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
{% endif %}
{% if page.sitemap.changefreq %}
<changefreq>{{ page.sitemap.changefreq }}</changefreq>
{% else %}
<changefreq>weekly</changefreq>
{% endif %}
{% if page.sitemap.priority %}
<priority>{{ page.sitemap.priority }}</priority>
{% else %}
<priority>0.5</priority>
{% endif %}
{% if page.sitemap.images %}
{% for page_image in page.sitemap.images %}
{% include image4sitemap.html image=page_image %}
{% endfor %}
{% endif %}
</url>
{% endunless %}
{% endfor %}
{% for casestudy in site.case-studies %}
{% unless casestudy.sitemap.exclude %}
<url>
<loc>{{ site.url }}{{ casestudy.url | remove: "index.html" }}</loc>
{% if casestudy.sitemap.lastmod %}
<lastmod>{{ casestudy.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif casestudy.date %}
<lastmod>{{ casestudy.date | date_to_xmlschema }}</lastmod>
{% else %}
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
{% endif %}
{% if casestudy.sitemap.changefreq %}
<changefreq>{{ casestudy.sitemap.changefreq }}</changefreq>
{% else %}
<changefreq>weekly</changefreq>
{% endif %}
{% if casestudy.sitemap.priority %}
<priority>{{ casestudy.sitemap.priority }}</priority>
{% else %}
<priority>0.6</priority>
{% endif %}
{% if casestudy.img %}
{% include image4sitemap.html image=casestudy.img %}
{% endif %}
{% if casestudy.sitemap.images %}
{% for casestudy_image in casestudy.sitemap.images %}
{% include image4sitemap.html image=casestudy_image %}
{% endfor %}
{% endif %}
</url>
{% endunless %}
{% endfor %}
</urlset>