Class: Awestruct::Handlers::FrontMatterHandler

Inherits:
BaseHandler
  • Object
show all
Defined in:
lib/awestruct/handlers/front_matter_handler.rb

Instance Attribute Summary

Attributes inherited from BaseHandler

#delegate, #site

Instance Method Summary collapse

Methods inherited from BaseHandler

#content_syntax, #dependencies, #execute_shell, #input_mtime, #output_extension, #output_filename, #output_path, #path, #relative_source_path, #simple_name, #stale?, #to_chain

Constructor Details

#initialize(site, delegate) ⇒ FrontMatterHandler

Returns a new instance of FrontMatterHandler



10
11
12
13
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 10

def initialize(site, delegate)
  super
  @parsed_parts = false
end

Instance Method Details

#content_line_offsetObject



30
31
32
33
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 30

def content_line_offset
  parse_parts()
  @content_line_offset
end

#front_matterObject



15
16
17
18
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 15

def front_matter
  parse_parts()
  @front_matter
end

#inherit_front_matter(page) ⇒ Object



35
36
37
38
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 35

def inherit_front_matter(page)
  page.inherit_front_matter_from( front_matter )
  super
end

#raw_contentObject



20
21
22
23
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 20

def raw_content
  parse_parts()
  @raw_content
end

#rendered_content(context, with_layouts) ⇒ Object



25
26
27
28
# File 'lib/awestruct/handlers/front_matter_handler.rb', line 25

def rendered_content(context, with_layouts)
  parse_parts()
  @raw_content
end