Skip to content

Commit

Permalink
SEO optimizations
Browse files Browse the repository at this point in the history
Does not include google analytics on debug and on 404 and 500 pages
  • Loading branch information
vstoykov committed Aug 28, 2013
1 parent 7c193e4 commit 1fce60c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 4 additions & 0 deletions venelin/templates/404.html
@@ -1,6 +1,10 @@
{% extends "base.html" %}

{% block title %}Заявеният адрес не може да бъде намерен {% endblock %}
{% block seo_tags %}
<meta name="robots" content="noindex, follow">
{% endblock %}
{% block ga %}{% endblock %}

{% block main_content %}
<div class="article">
Expand Down
11 changes: 1 addition & 10 deletions venelin/templates/500.html
Expand Up @@ -5,6 +5,7 @@
<meta name="author" content="Venelin Stoykov"/>
<meta name="google-site-verification" content="HEaaQ5lv83-FYJUz9g5WuIUjISZZSrCs6fcOkAa5__8" />
<title>Грешка | Венелин Стойков</title>
<meta name="robots" content="noindex, follow">
<link rel="shortcut icon" href="/static/favicon.ico"/>
<link rel="alternate" type="application/rss+xml" title="Последни статии от блога на Венелин Стойков" href="/blog/feed/" />
<link rel="stylesheet" type="text/css" href="/static/css/style.css?v=4" media="all"/>
Expand Down Expand Up @@ -119,15 +120,5 @@ <h3>Нещо се обърка и страницата не може да бъд
<a href="/about/">Венелин Стойков</a>
</p>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22285007-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
4 changes: 4 additions & 0 deletions venelin/templates/base.html
Expand Up @@ -20,6 +20,8 @@
{% endif %}
{% block js %}{% endblock %}
{% block extra_head %}{% endblock %}
{% block ga %}
{% if not debug %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22285007-1']);
Expand All @@ -30,6 +32,8 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{% endblock %}
</head>
<body>
<div id="header" class="shadow">
Expand Down

0 comments on commit 1fce60c

Please sign in to comment.