Add support for a separate value of the robots meta tag on hidden pages

This commit is contained in:
olipratt 2017-02-26 12:38:07 +00:00
parent 2d76193b9e
commit 7f4933f16d
3 changed files with 12 additions and 3 deletions

View file

@ -40,7 +40,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="{{ ROBOTS }}" />
<meta name="robots" content="{{ ROBOTS_HIDDEN if (ROBOTS_HIDDEN and page in hidden_pages) else ROBOTS }}" />
{% if BROWSER_COLOR %}
<!-- Chrome, Firefox OS and Opera -->
@ -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 %}
</body>
</html>

View file

@ -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` `<meta>` tag.

View file

@ -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'