From 7f4933f16de4ac611471643eac0d2892470f2938 Mon Sep 17 00:00:00 2001 From: olipratt Date: Sun, 26 Feb 2017 12:38:07 +0000 Subject: [PATCH] Add support for a separate value of the robots meta tag on hidden pages --- templates/base.html | 6 +++--- tests/content/pages/hidden.md | 8 ++++++++ tests/pelicanconf.py | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 tests/content/pages/hidden.md diff --git a/templates/base.html b/templates/base.html index 6cd02ea..8b3ba8e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -40,7 +40,7 @@ - + {% if BROWSER_COLOR %} @@ -182,9 +182,9 @@ {% include "partial/jsonld.html" %} {% block additional_js %}{% endblock %} - + {% if GITHUB_CORNER_URL %} - {% include 'partial/github.html' %} + {% include 'partial/github.html' %} {% endif %} diff --git a/tests/content/pages/hidden.md b/tests/content/pages/hidden.md new file mode 100644 index 0000000..f78e6cf --- /dev/null +++ b/tests/content/pages/hidden.md @@ -0,0 +1,8 @@ +Title: Hidden +Date: 2016-01-01 12:00 +Modified: 2016-01-01 12:00 +Status: hidden + +This is a hidden page. + +It will have the contents of `ROBOTS_HIDDEN` as the value of the `Robots` `` tag. diff --git a/tests/pelicanconf.py b/tests/pelicanconf.py index 86b2f4a..9468f50 100644 --- a/tests/pelicanconf.py +++ b/tests/pelicanconf.py @@ -19,6 +19,7 @@ FAVICON = SITEURL + '/images/favicon.ico' BROWSER_COLOR = '#333' ROBOTS = u'index, follow' +# ROBOTS_HIDDEN = u'noindex, nofollow' THEME = u'../' PATH = u'content'