feat: added site map
This commit is contained in:
parent
7682677cf6
commit
a7676d06b6
9 changed files with 62 additions and 21 deletions
15
sitemap.njk
Normal file
15
sitemap.njk
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
permalink: /sitemap.xml
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{%- for page in collections.all %}
|
||||
{%- if page.url and page.url != "/sitemap.xml" and not page.data.excludeFromSitemap %}
|
||||
<url>
|
||||
<loc>{{ site.url }}{{ page.url }}</loc>
|
||||
<lastmod>{{ (page.data.updatedAt or page.data.createdAt or page.date) | isoDate }}</lastmod>
|
||||
</url>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
</urlset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue