Class: Bobkit::MarkdownBridge::MarkdownHandler

Inherits:
Object
  • Object
show all
Includes:
LocationOptions, SlimBridge, Singleton
Defined in:
lib/bobkit/markdown_bridge.rb

Instance Method Summary collapse

Methods included from LocationOptions

#assets_folder, #assets_output_folder, #coffee_folder, #css_output_folder, #js_output_folder, #layouts_folder, #locales_folder, #markdown_folder, #output_folder, #root_folder, #styles_folder, #templates_folder

Methods included from OptionsBase

#options, #setopt, #use_defaults

Methods included from SlimBridge

#render

Instance Method Details

#compile(file, options = {}) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/bobkit/markdown_bridge.rb', line 12

def compile(file, options={})
  markdown = RDiscount.new file_content file
  content = markdown.to_html
  options[:content] = content
  content = render options if options[:layout]
  content
end