Hide hidden talks from sitemap, add robots meta tag

This commit is contained in:
Oliver Davies 2017-05-15 19:00:17 +01:00
parent 00378fc778
commit df253d4da5
2 changed files with 15 additions and 1 deletions

View file

@ -40,3 +40,7 @@
<meta name="twitter:text:description" content="{{ og.description|raw }}"/>
<meta name="twitter:site" content="@{{ site.twitter.name }}"/>
{% endif %}
{% if page.hide_page %}
<meta name="robots" content="no-index, no-follow">
{% endif %}

View file

@ -1,6 +1,6 @@
---
permalink: sitemap.xml
use: [posts]
use: [posts, talks]
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@ -36,4 +36,14 @@ use: [posts]
<priority>1.0</priority>
</url>
{% endfor %}
{% for talk in data.talks if not talk.hide_page %}
<url>
<loc>{{ site.url }}{{ talk.url }}/</loc>
<lastmod>{{ talk.date|date('c') }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
{% endfor %}
</urlset>