mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
@@ -88,6 +88,10 @@ authors should review how [search and themes] interact.
|
||||
* Update links to Python-Markdown library (#1360).
|
||||
* Document how to generate manpages for MkDocs commands (#686).
|
||||
|
||||
## Version 0.17.4
|
||||
|
||||
* Bugfix: Add multi-level nesting support to sitemap.xml (#1482).
|
||||
|
||||
## Version 0.17.3 (2018-03-07)
|
||||
|
||||
* Bugfix: Set dependency `tornado>=4.1,<5.0` due to changes in 5.0 (#1428).
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
{%- macro nav_item(item) -%}
|
||||
{%- if item.children -%}
|
||||
{%- for child in item.children -%}
|
||||
{{ nav_item(child) }}
|
||||
{%- endfor -%}
|
||||
{%- else %}
|
||||
<url>
|
||||
<loc>{% if item.canonical_url %}{{ item.canonical_url }}{% else %}{{ item.abs_url }}{% endif %}</loc>
|
||||
{% if item.update_date %}<lastmod>{{item.update_date}}</lastmod>{% endif %}
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{% for nav_item in nav %}
|
||||
{% if nav_item.children %}
|
||||
{% for nav_item in nav_item.children %}
|
||||
<url>
|
||||
<loc>{{ config.site_url }}{{ nav_item.abs_url }}</loc>
|
||||
{% if nav_item.update_date %}<lastmod>{{nav_item.update_date}}</lastmod>{% endif %}
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<url>
|
||||
<loc>{{ config.site_url }}{{ nav_item.abs_url }}</loc>
|
||||
{% if nav_item.update_date %}<lastmod>{{nav_item.update_date}}</lastmod>{% endif %}
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%- for item in nav -%}
|
||||
{{ nav_item(item) }}
|
||||
{%- endfor %}
|
||||
</urlset>
|
||||
|
||||
Reference in New Issue
Block a user