Skip to content

Commit

Permalink
Removed noindex pages and JS file from sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemcgregor committed May 3, 2017
1 parent 595dd53 commit 45bd775
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
<url>
<loc>{{ site.url }}{{ page.url | remove: "index.html" }}</loc>
{% if page.sitemap.lastmod %}
Expand All @@ -53,4 +53,4 @@ sitemap:
</url>
{% endunless %}
{% endfor %}
</urlset>
</urlset>

0 comments on commit 45bd775

Please sign in to comment.