Fix sitemap errors.

This commit is contained in:
mtail 2017-06-15 11:08:27 -07:00
parent 9c4b177418
commit 00344a3268
2 changed files with 7 additions and 4 deletions

View File

@ -6,4 +6,4 @@ User-agent: *
{% for node in site.pages %}{% if node.noindex %}{% assign isset = true %}Disallow: {{ node.url }}
{% endif %}{% endfor %}{% if isset != true %}Disallow:
{% endif %}
Sitemap: {{ site.baseurl }}/sitemap.xml
Sitemap: https://istio.io/sitemap.xml

View File

@ -2,18 +2,21 @@
title : "Sitemap"
sitemap_exclude: y
---
{% assign istio = "https://istio.io" %}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}
<url>
<loc>{{site.baseurl}}{{ post.url | remove: 'index.html' }}</loc>
<loc>{{istio}}{{ post.url | remove: 'index.html' }}</loc>
</url>
{% endfor %}
{% for page in site.pages %}
{% if page.sitemap_exclude != 'y' %}
<url>
<loc>{{site.baseurl}}{{ page.url | remove: 'index.html' }}</loc>
<loc>{{istio}}{{ page.url | remove: 'index.html' }}</loc>
</url>
{% endif %}
{% endfor %}
@ -21,7 +24,7 @@ sitemap_exclude: y
{% for page in site.docs %}
{% if page.sitemap_exclude != 'y' %}
<url>
<loc>{{site.baseurl}}{{ page.url | remove: 'index.html' }}</loc>
<loc>{{istio}}{{ page.url | remove: 'index.html' }}</loc>
</url>
{% endif %}
{% endfor %}