I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit b16fb65a authored by str4d's avatar str4d
Browse files

Redirects for old spec URLs

parent 3858bbab
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,22 @@ from i2p2www.blog.helpers import get_blog_posts
def main_index():
return redirect(url_for('site_show', lang='en'))
SPEC_REDIRECTS = {
'docs/how/cryptography': 'cryptography',
}
# Site pages
@cache.cached()
def site_show(page):
if page.endswith('.html'):
return redirect(url_for('site_show', page=page[:-5]))
# Redirect for old spec pages
if page.startswith('docs/spec/'):
return redirect(url_for('spec_show', name=page[10:]))
if page in SPEC_REDIRECTS:
return redirect(url_for('spec_show', name=SPEC_REDIRECTS[page]))
name = 'site/%s.html' % page
page_file = safe_join(TEMPLATE_DIR, name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment