Better noindex

master
Nick Sergeant 2012-06-05 23:06:58 -04:00
parent 75cd7f6c9b
commit 8a2e8b7833
6 changed files with 4 additions and 23 deletions

View File

@ -1,11 +1,5 @@
{% extends "base.html" %}
{% block meta %}
{% if 'page' in request.get_full_path %}
<meta name="robots" content="noindex, follow" />
{% endif %}
{% endblock %}
{% block body-class %}blog-site{% endblock %}
{% block html-class %}blog-site{% endblock %}

View File

@ -2,12 +2,6 @@
{% load pagination_tags %}
{% block meta %}
{% if 'page' in request.get_full_path %}
<meta name="robots" content="noindex, follow" />
{% endif %}
{% endblock %}
{% block body-class %}{{ block.super }} blog-list{% endblock %}
{% block js %}

View File

@ -2,12 +2,6 @@
{% load pagination_tags %}
{% block meta %}
{% if 'page' in request.get_full_path %}
<meta name="robots" content="noindex, follow" />
{% endif %}
{% endblock %}
{% block body-class %}{{ block.super }}{% if user.username == 'blog' %} blog{% endif %}{% endblock %}
{% block page-title %}/ {% if public and not public_user %}public{% else %}{{ user.username }}{% endif %}{% if tag %} / {{ tag }}{% endif %} - {{ block.super }}{% endblock %}

View File

@ -201,6 +201,7 @@ def search(request, template='search/search.html', load_all=True, form_class=Mod
context = {
'form': form,
'has_snipts': True,
'page': page,
'paginator': paginator,
'query': query,

View File

@ -10,7 +10,9 @@
<meta name="description" content="Long-term memory for coders. Share and store code snippets." />
{% endblock %}
{% block meta %}{% endblock %}
{% if has_snipts and not detail and not request.blog_user %}
<meta name="robots" content="noindex, follow" />
{% endif %}
{% compress css %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />

View File

@ -4,10 +4,6 @@
{% block html-class %}search{% endblock %}
{% block body-class %}search static{% endblock %}
{% block meta %}
<meta name="robots" content="noindex, follow" />
{% endblock %}
{% block js %}
{{ block.super }}
window.detail = false;