diff --git a/special/master/misc/sitemap.xml b/special/master/misc/sitemap.xml index 4ef7e6c50..e3e3727d8 100644 --- a/special/master/misc/sitemap.xml +++ b/special/master/misc/sitemap.xml @@ -9,7 +9,7 @@ sitemap: {% assign pages = site.pages %} {% assign posts = site.posts %} {% assign data = pages | concat: posts %} - {% assign default_time = site.time | date_to_xmlschema %} + {% assign default-time = site.time | date_to_xmlschema %} {%- if site.sitemap.enable != false -%} {% for page in data %} @@ -23,10 +23,14 @@ sitemap: {%- endif -%} - {{ site.url }}{{ page.url }} + {%- if page.url == '/' -%} + {{ site.url }} + {%- else -%} + {{ site.url }}{{ page.url }} + {%- endif -%} {%- if page.sitemap.lastmod == null -%} - {{ default_time }} + {{ default-time }} {%- else -%} {{ page.sitemap.lastmod | date_to_xmlschema }} {%- endif -%}