diff --git a/sitemap1.md b/sitemap1.md
index 1d9567547..8f4bd7a90 100644
--- a/sitemap1.md
+++ b/sitemap1.md
@@ -11,8 +11,14 @@ title: Site map
{% assign sorted_pages = site.pages | sort: "dir" %}
{% for page in sorted_pages %}
{% unless page.layout == nil or page.layout == 'none' or page.dir contains '/blog/page' %}
-
{{page.title}} page.dir={{ page.dir }}; page.path={{ page.path }};
- page.layout={{ page.layout }}; page.name={{ page.name }}; page.sitemap.exclude={{ page.sitemap.exclude }}; page.exclude= {{ page.exclude }};
+ {% assign path = page.dir | split: "/" %}
+ {% for dir in path %}
+ {% unless forloop.last %}
+ {{ dir }}/
+ {% endunless %}
+ {% endfor %}
+ {{page.title}} page.path={{ page.path }};
+ page.layout={{ page.layout }}; page.name={{ page.name }};
{% endunless %}
{% endfor %}