Commit 4de8157f42e85e6c4eac8d3776e1849603755375
1 parent
35208341
Exists in
master
and in
39 other branches
Adding option to disallow robots
Showing
4 changed files
with
13 additions
and
0 deletions
Show diff stats
src/colab/custom_settings.py
@@ -210,6 +210,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( | @@ -210,6 +210,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( | ||
210 | 'django_browserid.context_processors.browserid', | 210 | 'django_browserid.context_processors.browserid', |
211 | 'django_mobile.context_processors.is_mobile', | 211 | 'django_mobile.context_processors.is_mobile', |
212 | 'super_archives.context_processors.mailarchive', | 212 | 'super_archives.context_processors.mailarchive', |
213 | + 'home.context_processors.robots', | ||
213 | ) | 214 | ) |
214 | 215 | ||
215 | MIDDLEWARE_CLASSES = ( | 216 | MIDDLEWARE_CLASSES = ( |
src/colab/local_settings-dev.py
src/templates/base.html
@@ -5,6 +5,12 @@ | @@ -5,6 +5,12 @@ | ||
5 | {% block head %} | 5 | {% block head %} |
6 | <meta charset="UTF-8" /> | 6 | <meta charset="UTF-8" /> |
7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
8 | + {% block metarobots %} | ||
9 | + {% if ROBOTS_NOINDEX %} | ||
10 | + <meta name="robots" content="noindex, nofollow" /> | ||
11 | + {% endif %} | ||
12 | + {% endblock %} | ||
13 | + | ||
8 | <title>Colab - {% block title %}Colab{% endblock %}</title> | 14 | <title>Colab - {% block title %}Colab{% endblock %}</title> |
9 | 15 | ||
10 | <link rel="shortcut icon" type="image/x-icon" href="{{ STATIC_URL }}img/interlegis.ico"> | 16 | <link rel="shortcut icon" type="image/x-icon" href="{{ STATIC_URL }}img/interlegis.ico"> |