Normalize page redirections

Use a fallback HTML page with a manual and javascript redirect
Keep canonical pages only for alerts
This commit is contained in:
Saivann 2013-10-14 14:59:10 -04:00
parent b988ce349c
commit 3da682b36b
11 changed files with 69 additions and 54 deletions

View file

@ -14,7 +14,8 @@ module Jekyll
self.data['date'] = year + '-' + month + '-' + day
self.data['layout'] = 'release'
if dstdir.index('/releases/') === 0
self.data['redirect'] = dst.gsub('.md','')
self.data['redirect'] = '/en/release/' + dst.gsub('.md','')
self.data['layout'] = 'redirect'
else
self.data['category'] = 'release'
if !site.config.has_key?('DOWNLOAD_DATE') or site.config['DOWNLOAD_DATE'] < year + '-' + month + '-' + day