From a8c69aa7eb6ba2e9eba12ac83147a99993856785 Mon Sep 17 00:00:00 2001 From: mathiasdm Date: Tue, 23 Mar 2010 14:05:41 +0000 Subject: [PATCH] Using rel="canonical", so Google knows the main domain. --- www.i2p2/app.py | 4 +++- www.i2p2/pages/_layout.html | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www.i2p2/app.py b/www.i2p2/app.py index 3002fa78..8b1bb8a4 100644 --- a/www.i2p2/app.py +++ b/www.i2p2/app.py @@ -8,6 +8,8 @@ import sha from time import time from random import randint +domain = "http://www.i2p2.de" + class Request(BaseRequest): """Useful subclass of the default request that knows how to build urls.""" @@ -52,7 +54,7 @@ def app(environ, start_response): tmpl = env.get_template(path + '.html') except TemplateNotFound: tmpl = env.get_template('not_found.html') - resp = Response(tmpl.render(static=False, theme=theme), mimetype=mime_type) + resp = Response(tmpl.render(static=False, theme=theme, domain=domain, path=path), mimetype=mime_type) # more theme handling if theme == 'light' and 'style' in req.cookies: resp.delete_cookie('style') diff --git a/www.i2p2/pages/_layout.html b/www.i2p2/pages/_layout.html index dd117bd7..6fef9c40 100644 --- a/www.i2p2/pages/_layout.html +++ b/www.i2p2/pages/_layout.html @@ -5,6 +5,7 @@ {% filter capture('title') %}{% block title %}{% endblock %}{% endfilter %} - I2P +