diff --git a/sitemap/test.xml b/sitemap/test.xml new file mode 100644 index 0000000000..c3fe8ab290 --- /dev/null +++ b/sitemap/test.xml @@ -0,0 +1,66 @@ +--- +layout: null +sitemap: + exclude: 'yes' +--- + + + + {% for page in site.pages %} + {% unless page.sitemap.exclude == "yes" or page.name == "feed.xml" %} + + + {{ site.liveUrl }}{{ page.url | remove: "index.html" }} + + {% if page.sitemap.lastmod %} + {{ page.sitemap.lastmod | date: "%Y-%m-%d" }} + {% elsif page.date %} + {{ page.date | date_to_xmlschema }} + {% else %} + {{ site.time | date_to_xmlschema }} + {% endif %} + {% if page.sitemap.changefreq %} + {{ page.sitemap.changefreq }} + {% else %} + monthly + {% endif %} + {% if page.sitemap.priority %} + {{ page.sitemap.priority }} + {% else %} + 0.3 + {% endif %} + + {% endunless %} + {% endfor %} + + {% for collection in site.collections %} + {% for post in collection.docs %} + {% unless post.published == false or post.sitemap.exclude == "yes" or page.name == "feed.xml" %} + + {{ site.liveUrl }}{{ post.url }} + {% if post.sitemap.lastmod %} + {{ post.sitemap.lastmod | date: "%Y-%m-%d" }} + {% elsif post.date %} + {{ post.date | date_to_xmlschema }} + {% else %} + {{ site.time | date_to_xmlschema }} + {% endif %} + {% if post.sitemap.changefreq %} + {{ post.sitemap.changefreq }} + {% else %} + monthly + {% endif %} + {% if post.sitemap.priority %} + {{ post.sitemap.priority }} + {% else %} + 0.5 + {% endif %} + + {% endunless %} + {% endfor %} + {% endfor %} +