Add support for a separate value of the robots meta tag on hidden pages
This commit is contained in:
parent
2d76193b9e
commit
7f4933f16d
3 changed files with 12 additions and 3 deletions
|
@ -40,7 +40,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="HandheldFriendly" content="True" />
|
<meta name="HandheldFriendly" content="True" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<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 %}
|
{% if BROWSER_COLOR %}
|
||||||
<!-- Chrome, Firefox OS and Opera -->
|
<!-- Chrome, Firefox OS and Opera -->
|
||||||
|
@ -182,9 +182,9 @@
|
||||||
{% include "partial/jsonld.html" %}
|
{% include "partial/jsonld.html" %}
|
||||||
|
|
||||||
{% block additional_js %}{% endblock %}
|
{% block additional_js %}{% endblock %}
|
||||||
|
|
||||||
{% if GITHUB_CORNER_URL %}
|
{% if GITHUB_CORNER_URL %}
|
||||||
{% include 'partial/github.html' %}
|
{% include 'partial/github.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
8
tests/content/pages/hidden.md
Normal file
8
tests/content/pages/hidden.md
Normal 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.
|
|
@ -19,6 +19,7 @@ FAVICON = SITEURL + '/images/favicon.ico'
|
||||||
BROWSER_COLOR = '#333'
|
BROWSER_COLOR = '#333'
|
||||||
|
|
||||||
ROBOTS = u'index, follow'
|
ROBOTS = u'index, follow'
|
||||||
|
# ROBOTS_HIDDEN = u'noindex, nofollow'
|
||||||
|
|
||||||
THEME = u'../'
|
THEME = u'../'
|
||||||
PATH = u'content'
|
PATH = u'content'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue