big overhaul
This commit is contained in:
20
templates/sitemap.xml
Normal file
20
templates/sitemap.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{% set root = get_section(path="_index.md") %}
|
||||
{% for page in root.pages %}
|
||||
<url>
|
||||
<loc>{{ page.permalink | safe }}</loc>
|
||||
{% if page.date %}<lastmod>{{ page.date | date(format="%Y-%m-%d") }}</lastmod>{% endif %}
|
||||
</url>
|
||||
{% endfor %}
|
||||
|
||||
{% for subsection in root.subsections %}
|
||||
{% set sub = get_section(path=subsection) %}
|
||||
{% for page in sub.pages %}
|
||||
<url>
|
||||
<loc>{{ page.permalink | safe }}</loc>
|
||||
{% if page.date %}<lastmod>{{ page.date | date(format="%Y-%m-%d") }}</lastmod>{% endif %}
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</urlset>
|
||||
Reference in New Issue
Block a user