From bd21ecf3c9ae4963ed8c0d111d698fcc6d479551 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Mon, 6 Jul 2015 11:22:18 -0400 Subject: [PATCH] Plugins: Allow alerts.rb To Process Markdown --- _plugins/alerts.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_plugins/alerts.rb b/_plugins/alerts.rb index 53f14054..770fdd42 100644 --- a/_plugins/alerts.rb +++ b/_plugins/alerts.rb @@ -26,6 +26,7 @@ module Jekyll @base = base @dir = '/'+dstdir @name = dst + extension = dst.split('.')[-1] self.process(dst) self.read_yaml(File.join(base, srcdir), src) self.data['lang'] = lang @@ -38,7 +39,7 @@ module Jekyll self.data['category'] = 'alert' if self.data.has_key?('banner') and !self.data['banner'].nil? and self.data['banner'].length>0 site.config['ALERT']=self.data['banner'] - site.config['ALERTURL']='/'+dstdir+'/'+dst.gsub('.html','') + site.config['ALERTURL']='/'+dstdir+'/'+dst.gsub('.html','').gsub('.md','') if self.data.has_key?('bannerclass') and !self.data['bannerclass'].nil? and self.data['bannerclass'].length>0 site.config['ALERTCLASS'] = self.data['bannerclass'] end @@ -47,8 +48,8 @@ module Jekyll site.config['STATUS'] = 1 end if self.data.has_key?('alias') - site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'.html', date) - site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'/index.html', date) + site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'.'+extension, date) + site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'/index.'+extension, date) end end end