Add 'robots.txt' and 'sitemap.xml'.
This commit is contained in:
parent
d037749df8
commit
3bdb0f0e6d
8
robots.txt
Normal file
8
robots.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
|
User-Agent: *
|
||||||
|
Disallow: /assets/
|
||||||
|
Disallow: /robots.txt
|
||||||
|
Disallow: /sitemap.xml
|
||||||
|
Disallow: /*.pgn$
|
||||||
|
Sitemap: {{ site.url }}/sitemap.xml
|
28
sitemap.xml
Normal file
28
sitemap.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>{{ site.url }}/</loc>
|
||||||
|
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
{% assign exclude = ".htaccess sitemap.xml robots.txt" | split: " " %}
|
||||||
|
{% for page in site.pages %}
|
||||||
|
{% assign basename = page.url | split: "/" | last %}
|
||||||
|
{% if exclude contains basename %}
|
||||||
|
{% else %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ site.url }}{{ page.url }}</loc>
|
||||||
|
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
|
||||||
|
</url>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for post in site.posts %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ site.url }}{{ post.url }}</loc>
|
||||||
|
<lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
|
||||||
|
</url>
|
||||||
|
{% endfor %}
|
||||||
|
</urlset>
|
Loading…
Reference in New Issue
Block a user