Skip to content

Commit

Permalink
fix: resolve sitemap parsing error in Chrome (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Aug 10, 2023
1 parent 79e8678 commit 64387bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sitemap.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %}
{%- if page.url and page.data.locale == "en-CA" -%}
<url>
<loc>{{ site[defaultLanguage].url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date.toISOString() }}</lastmod>
{% set links = page.url | locale_links %}
{%- for link in links -%}
<xhtml:link rel="alternate" hreflang="{{ link.lang }}" href="{{ site[defaultLanguage].url }}{{ link.url }}"/>
<link rel="alternate" hreflang="{{ link.lang }}" href="{{ site[defaultLanguage].url }}{{ link.url }}"/>
{%- endfor %}
</url>
{% endif -%}
Expand Down

0 comments on commit 64387bf

Please sign in to comment.