Commit cfc688b1 authored by Tien Nguyen's avatar Tien Nguyen Committed by Waylan Limberg
Browse files

Update sitemap.xml (#1465)

Hide <lastmod/> when it nav_item.update_date empty
parent 5c644955
......@@ -5,14 +5,14 @@
{% for nav_item in nav_item.children %}
<url>
<loc>{{ config.site_url }}{{ nav_item.abs_url }}</loc>
<lastmod>{{nav_item.update_date}}</lastmod>
{% 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>
<lastmod>{{nav_item.update_date}}</lastmod>
{% if nav_item.update_date %}<lastmod>{{nav_item.update_date}}</lastmod>{% endif %}
<changefreq>daily</changefreq>
</url>
{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment