From 45bd775e56d6f12ff6206f1b60aa0699be9985df Mon Sep 17 00:00:00 2001 From: Luke McGregor Date: Wed, 3 May 2017 14:38:16 +1200 Subject: [PATCH] Removed noindex pages and JS file from sitemap --- js/main.js | 3 +++ sitemap.xml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 1cb1b37..2c0ebb1 100755 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,9 @@ --- layout: null +sitemap: + exclude: 'yes' --- + $(document).ready(function () { $('a.blog-button').click(function (e) { if ($('.panel-cover').hasClass('panel-cover--collapsed')) return diff --git a/sitemap.xml b/sitemap.xml index 22ea939..7bbec08 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -30,7 +30,7 @@ sitemap: {% endunless %} {% endfor %} {% for page in site.pages %} - {% unless page.sitemap.exclude == "yes" %} + {% unless page.sitemap.exclude == "yes" or page.robots contains "noindex" %} {{ site.url }}{{ page.url | remove: "index.html" }} {% if page.sitemap.lastmod %} @@ -53,4 +53,4 @@ sitemap: {% endunless %} {% endfor %} - \ No newline at end of file +