Set latest download version automatically based on release notes

This commit is contained in:
Saivann 2013-09-04 13:29:36 -04:00
parent 264321ed22
commit bcebe9c481
3 changed files with 6 additions and 5 deletions

View file

@ -17,6 +17,10 @@ module Jekyll
self.data['redirect'] = dst.gsub('.md','')
else
self.data['category'] = 'release'
if !site.config.has_key?('DOWNLOAD_DATE') or site.config['DOWNLOAD_DATE'] < year + '-' + month + '-' + day
site.config['DOWNLOAD_DATE'] = year + '-' + month + '-' + day
site.config['DOWNLOAD_VERSION'] = dst.gsub('.md','').gsub(/[a-z]/,'')
end
site.pages << ReleasePage.new(site, base, lang, srcdir, src, '/releases/' + year + '/' + month + '/' + day, dst, year, month, day)
end
end