File: sitemap.xml

package info (click to toggle)
python-mkdocs 1.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,696 kB
  • sloc: python: 7,271; perl: 141; makefile: 25; xml: 19
file content (20 lines) | stat: -rw-r--r-- 628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 item in nav -%}
    {{ nav_item(item) }}
{%- endfor %}
</urlset>