mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
Add sitemap for SEO optimization
This commit is contained in:
parent
d878c77e28
commit
e61261eaae
15
src/site/sitemap.njk
Normal file
15
src/site/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 !== '/netlify/functions/search/data.json'%}
|
||||
<url>
|
||||
<loc>{{ site.url }}{{ page.url | url }}</loc>
|
||||
<lastmod>{{ page.date.toISOString() }}</lastmod>
|
||||
</url>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</urlset>
|
Loading…
x
Reference in New Issue
Block a user