Handle alert banners in alerts.rb

This commit is contained in:
Saivann 2013-07-14 01:04:26 -04:00
parent 9e25b71df5
commit b520e53047
11 changed files with 24 additions and 68 deletions

View file

@ -17,6 +17,9 @@ module Jekyll
self.data['redirect'] = src.split('.')[0]
else
self.data['category'] = 'alert'
if self.data.has_key?('banner') and !self.data['banner'].nil? and self.data['banner'].length>0
site.config['ALERT']='<a href="/'+dstdir+'/'+dst.gsub('.html','')+'">'+self.data['banner']+'</a>'
end
if self.data.has_key?('alias')
site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'.html', date)
end