Module: Middleman::CoreExtensions::FrontMatter::ResourceInstanceMethods
- Defined in:
- lib/middleman-core/core_extensions/front_matter.rb
Instance Method Summary collapse
-
#content_type ⇒ Object
Override Resource#content_type to take into account frontmatter.
-
#data ⇒ Hash
This page’s frontmatter.
- #ignored? ⇒ Boolean
Instance Method Details
#content_type ⇒ Object
Override Resource#content_type to take into account frontmatter
74 75 76 77 78 79 |
# File 'lib/middleman-core/core_extensions/front_matter.rb', line 74 def content_type # Allow setting content type in frontmatter too raw_data.fetch :content_type do super end end |
#data ⇒ Hash
This page’s frontmatter
69 70 71 |
# File 'lib/middleman-core/core_extensions/front_matter.rb', line 69 def data @enhanced_data ||= ::Middleman::Util.recursively_enhance(raw_data).freeze end |
#ignored? ⇒ Boolean
51 52 53 54 55 56 57 |
# File 'lib/middleman-core/core_extensions/front_matter.rb', line 51 def ignored? if !proxy? && raw_data[:ignored] == true true else super end end |