Repository navigation
Expand file tree
/
Copy pathsitemap.xml
More file actions
56 lines (56 loc) · 1.74 KB
/
Copy pathsitemap.xml
File metadata and controls
56 lines (56 loc) · 1.74 KB
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
---
layout: null
sitemap: false
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for p in site.pages %}
{%- assign last_char = p.url | slice: -1 -%}
{%- assign is_page = false -%}
{%- if last_char == '/' %}{% assign is_page = true %}{% endif -%}
{%- if p.url contains '.html' %}{% assign is_page = true %}{% endif -%}
{%- if p.url == '/404.html' %}{% assign is_page = false %}{% endif -%}
{%- if p.sitemap == false %}{% assign is_page = false %}{% endif -%}
{%- if is_page %}
<url>
<loc>{{ p.url | absolute_url }}</loc>
{%- if p.date %}
<lastmod>{{ p.date | date_to_xmlschema }}</lastmod>
{%- endif %}
<changefreq>{% if p.url == '/' %}weekly{% else %}monthly{% endif %}</changefreq>
<priority>{% if p.url == '/' %}1.0{% elsif p.url == '/news/' or p.url == '/team/' or p.url == '/blog/' %}0.9{% elsif p.url contains '/news/' %}0.8{% else %}0.6{% endif %}</priority>
</url>
{%- endif %}
{%- endfor %}
{%- for b in site.blog %}
<url>
<loc>{{ b.url | absolute_url }}</loc>
{%- if b.date %}
<lastmod>{{ b.date | date_to_xmlschema }}</lastmod>
{%- endif %}
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
{%- endfor %}
{%- for pr in site.projects %}
<url>
<loc>{{ pr.url | absolute_url }}</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
{%- endfor %}
{%- for m in site.team %}
<url>
<loc>{{ m.url | absolute_url }}</loc>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
{%- endfor %}
{%- for e in site.team_building %}
<url>
<loc>{{ e.url | absolute_url }}</loc>
<changefreq>yearly</changefreq>
<priority>0.4</priority>
</url>
{%- endfor %}
</urlset>