Skip to content

Commit

Permalink
Update sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwieds committed Nov 20, 2023
1 parent 5401b44 commit d138f79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions special/master/misc/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -23,10 +23,14 @@ sitemap:
{%- endif -%}

<url>
<loc>{{ site.url }}{{ page.url }}</loc>
{%- if page.url == '/' -%}
<loc>{{ site.url }}</loc>
{%- else -%}
<loc>{{ site.url }}{{ page.url }}</loc>
{%- endif -%}

{%- if page.sitemap.lastmod == null -%}
<lastmod>{{ default_time }}</lastmod>
<lastmod>{{ default-time }}</lastmod>
{%- else -%}
<lastmod>{{ page.sitemap.lastmod | date_to_xmlschema }}</lastmod>
{%- endif -%}
Expand Down

0 comments on commit d138f79

Please sign in to comment.