Added a basic sitemap and robots.txt
This commit is contained in:
parent
680516b0d5
commit
a4a4944084
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
permalink: '/robots.txt'
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
|
||||
User-agent: Baiduspider
|
||||
User-agent: Baiduspider-video
|
||||
User-agent: Baiduspider-image
|
||||
Disallow: /
|
||||
|
||||
User-agent: *
|
||||
Sitemap: /sitemap.xml
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
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 %}
|
||||
{% set path = page.url | url %}
|
||||
{% if page.data.title and not page.data.excludeFromSitemap %}
|
||||
<url>
|
||||
<loc>{{ site.url }}{{ path }}</loc>
|
||||
<lastmod>{{ page.date.toISOString() }}</lastmod>
|
||||
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
|
||||
</url>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</urlset>
|
Loading…
Reference in New Issue