diff --git a/templates/sitemap.xml.j2 b/templates/sitemap.xml.j2 index f324248..b815400 100644 --- a/templates/sitemap.xml.j2 +++ b/templates/sitemap.xml.j2 @@ -1,25 +1,22 @@ - - - {% for page in static_pages %} + + {%- for page in static_pages -%} {{ host_url + page }} {{ default_last_mod }} - {% endfor %} - {% for year in blog_posts %} - {% for month in blog_posts[year]|sort(reverse=True) %} - {% for day in blog_posts[year][month]|sort %} + {%- endfor -%} + {%- for year in blog_posts -%} + {%- for month in blog_posts[year]|sort(reverse=True) -%} + {%- for day in blog_posts[year][month]|sort -%} {{ host_url + blog_posts[year][month][day]['link_to_post'] }} - {{year}}-{{month}}-{{day}} + {{ year }}-{{ '%02d' % month }}-{{ '%02d' % day }} - {% endfor %} - {% endfor %} - {% endfor %} + {%- endfor -%} + {%- endfor -%} + {%- endfor -%} \ No newline at end of file