Skip to content

Commit e1b8a52

Browse files
authored
sitemap.xml lastmod respect page.data.updated (#324)
* fix: update lastmod tag to handle page updates correctly * fix: update lastmod tag to handle page updates correctly
1 parent 8181d41 commit e1b8a52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/site/sitemap.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ eleventyExcludeFromCollections: true
77
{% for page in collections.all %}
88
<url>
99
<loc>{{ meta.siteBaseUrl }}{{ page.url | url }}</loc>
10-
<lastmod>{{ page.date | dateToZulu }}</lastmod>
10+
<lastmod>{%if page.data.updated %}{{ page.data.updated | dateToZulu }}{%else%}{{ page.date | dateToZulu }}{%endif%}</lastmod>
1111
</url>
1212
{% endfor %}
1313
</urlset>

0 commit comments

Comments
 (0)