diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index dc563135..c8ee27bc 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -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) diff --git a/mkdocs/templates/sitemap.xml b/mkdocs/templates/sitemap.xml index cac1d1d7..3ef78a0f 100644 --- a/mkdocs/templates/sitemap.xml +++ b/mkdocs/templates/sitemap.xml @@ -4,11 +4,13 @@ {{ nav_item(child) }} {%- endfor -%} {%- else %} + {%- if not item.is_link -%} {% if item.canonical_url %}{{ item.canonical_url }}{% else %}{{ item.abs_url }}{% endif %} {% if item.update_date %}{{item.update_date}}{% endif %} daily + {%- endif -%} {%- endif -%} {%- endmacro -%}