-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsitemap.xml
More file actions
34 lines (31 loc) · 1.25 KB
/
sitemap.xml
File metadata and controls
34 lines (31 loc) · 1.25 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
---
layout: none
permalink: /sitemap.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- comment -%} POSTS (always indexable) {%- endcomment -%}
{% for post in site.posts %}
<url>
<loc>{{ site.url | append: post.url }}</loc>
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
{% endfor %}
{%- comment -%} PAGES (filter out assets, robots, sitemap; accept .md/.markdown/.html/.htm) {%- endcomment -%}
{% for page in site.pages %}
{% assign p = page.path | downcase %}
{% assign ext = p | split: '.' | last %}
{% unless p contains 'assets/' or page.url == '/robots.txt' or page.url == '/sitemap.xml' %}
{% if ext == 'md' or ext == 'markdown' or ext == 'html' or ext == 'htm' %}
<url>
<loc>{{ site.url | append: page.url }}</loc>
<lastmod>{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}</lastmod>
<changefreq>{% if page.url == '/' %}weekly{% else %}monthly{% endif %}</changefreq>
<priority>{% if page.url == '/' %}1.0{% else %}0.6{% endif %}</priority>
</url>
{% endif %}
{% endunless %}
{% endfor %}
</urlset>