forked from MattGreyDesign/himatt.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap.xml
33 lines (32 loc) · 1.52 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
---
layout: sitemap
---
{% if site.sitemap %}
{% capture site_url %}{% if site.url %}{{ site.url | append: site.baseurl }}{% else %}{{ site.github.url }}{% endif %}{% endcapture %}
<url>
<loc>{{ site.url }}/</loc>
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
{% for page in site.posts %}<url>
<loc>{{ site.url }}{{ page.url }}</loc>
<priority>{{ page.priority }}</priority>
</url>
{% endfor %}{% for page in site.html_pages %}{% unless page.sitemap == false %}{% assign page_url = site.url | append: page.url %}{% assign site_base_url = site.url | append: '/' %}{% unless page_url == site_base_url %}
<url>
<loc>{{ site.url }}{{ page.url }}</loc>{% if page.priority %}
<priority>{{ page.priority }}</priority>{% endif %}
</url>
{% endunless %}{% endunless %}{% endfor %}{% for collection in site.collections %}{% unless collection.last.output == false or collection.output == false or collection.label == 'posts' %}{% for doc in collection.last.docs %}{% unless doc.sitemap == false %}
<url>
<loc>{{ doc.url | replace:'/index.html','/' | prepend: site_url | normalize_url }}</loc>
<priority>0.7</priority>
</url>
{% endunless %}{% endfor %}{% for doc in collection.docs %}{% unless doc.sitemap == false %}
<url>
<loc>{{ doc.url | replace:'/index.html','/' | prepend: site_url | normalize_url }}</loc>
<priority>0.7</priority>
</url>
{% endunless %}{% endfor %}{% endunless %}{% endfor %}
</urlset>{% endif %}