skip external links in nav in sitemap (#1748)

Fixes #1742.
This commit is contained in:
brandongc
2019-02-14 14:50:31 -08:00
committed by Waylan Limberg
parent d93741a0e6
commit 31b3f68abc
2 changed files with 3 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ your global navigation uses more than one level, things will likely be broken.
* Bugfix: Account for encoded URLs (#1670).
* Bugfix: Ensure theme files do not override `docs_dir` files (#1671).
* Bugfix: Do not normalize URL fragments (#1655).
* Bugfix: Skip external URLs in sitemap.xml (#1742).
* Add canonical tag to `readthedocs` theme (#1669).
## Version 1.0.4 (2018-09-07)

View File

@@ -4,11 +4,13 @@
{{ nav_item(child) }}
{%- endfor -%}
{%- else %}
{%- if not item.is_link -%}
<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 -%}
{%- endif -%}
{%- endmacro -%}