Module: Awestruct::Markdownable

Included in:
MarkdownFile
Defined in:
lib/awestruct/markdownable.rb

Instance Method Summary collapse

Instance Method Details

#contentObject



18
19
20
21
# File 'lib/awestruct/markdownable.rb', line 18

def content
  context = site.engine.create_context( self )
  render( context )
end

#render(context) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/awestruct/markdownable.rb', line 6

def render(context)
  rendered = ''
  begin
    doc = RDiscount.new( context.interpolate_string( raw_page_content ) )
    rendered = doc.to_html
  rescue => e
    puts e
    puts e.backtrace
  end
  rendered
end