Class: Awestruct::Handlers::OrgmodeHandler
Constant Summary
collapse
- CHAIN =
Awestruct::HandlerChain.new( /\.org$/,
Awestruct::Handlers::FileHandler,
Awestruct::Handlers::FrontMatterHandler,
Awestruct::Handlers::InterpolationHandler,
Awestruct::Handlers::OrgmodeHandler,
Awestruct::Handlers::LayoutHandler
)
Instance Attribute Summary
Attributes inherited from BaseHandler
#delegate, #site
Instance Method Summary
collapse
Methods inherited from BaseHandler
#content_line_offset, #dependencies, #execute_shell, #front_matter, #inherit_front_matter, #input_mtime, #output_path, #path, #raw_content, #relative_source_path, #stale?, #to_chain
Constructor Details
#initialize(site, delegate) ⇒ OrgmodeHandler
Returns a new instance of OrgmodeHandler.
22
23
24
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 22
def initialize(site, delegate)
super( site, delegate )
end
|
Instance Method Details
#content_syntax ⇒ Object
38
39
40
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 38
def content_syntax
:orgmode
end
|
#output_extension ⇒ Object
34
35
36
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 34
def output_extension
'.html'
end
|
#output_filename ⇒ Object
30
31
32
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 30
def output_filename
File.basename( relative_source_path, '.org' ) + '.html'
end
|
#rendered_content(context, with_layouts = true) ⇒ Object
42
43
44
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 42
def rendered_content(context, with_layouts=true)
Orgmode::Parser.new(super( context, with_layouts) ).to_html
end
|
#simple_name ⇒ Object
26
27
28
|
# File 'lib/awestruct/handlers/orgmode_handler.rb', line 26
def simple_name
File.basename( relative_source_path, '.org' )
end
|