mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Plugins: Allow alerts.rb To Process Markdown
This commit is contained in:
parent
8c3852e230
commit
bd21ecf3c9
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue