Skip to content

Commit 30d40ce

Browse files
authored
Fix sitemap URL and last modified date formatting
Updated sitemap generation to use 'site.url' and format last modified date.
1 parent 429a5f6 commit 30d40ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/xml_sitemap.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ layout: false
88
{%- for page in collections.all -%}
99
{%- if page.url != '' and page.data.sitemapIgnore != true -%}
1010
<url>
11-
<loc>{{ env.siteUrl }}{{ page.url | url }}</loc>
12-
{%- if page.date -%}<lastmod>{{ page.date }}</lastmod>{%- endif -%}
11+
<loc>{{ site.url }}{{ page.url | url }}</loc>
12+
{%- if page.date -%}<lastmod>{{ page.date.toISOString() }}</lastmod>{%- endif -%}
1313
{%- if page.data.changefreq -%}<changefreq>{{ page.data.changefreq }}</changefreq>{%- endif -%}
1414
{%- if page.data.priority -%}<priority>{{ page.data.priority }}</priority>{%- endif -%}
1515
</url>

0 commit comments

Comments
 (0)