Create sitemap.xml
This commit is contained in:
parent
4c944c16d7
commit
82df281cfb
|
@ -7,4 +7,4 @@ Disallow:
|
|||
|
||||
{{ robots.txt }}
|
||||
|
||||
Sitemap: {{ sitemeta.siteUrl }}/sitemap/
|
||||
Sitemap: {{ sitemeta.siteUrl }}/sitemap.xml
|
|
@ -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 item in collections.all -%}
|
||||
<url>
|
||||
<loc>{{ sitemeta.siteUrl + item.url | url }}</loc>
|
||||
<lastmod>{% if item.updated %}{{ item.updated.toISOString() }}{% else %}{{ item.date.toISOString() }}{% endif %}</lastmod>
|
||||
<changefreq>{{ item.data.sitemap.changefreq | default("monthly") }}</changefreq>
|
||||
<priority>{{ item.data.sitemap.priority | default(0.5) }}</priority>
|
||||
</url>
|
||||
{%- endfor %}
|
||||
</urlset>
|
Loading…
Reference in New Issue