module Middleman::CoreExtensions::FrontMatter::ResourceInstanceMethods
Public Instance Methods
content_type()
click to toggle source
Override Resource#content_type to take into account frontmatter
Calls superclass method
# 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()
click to toggle source
This page’s frontmatter @return [Hash]
# File lib/middleman-core/core_extensions/front_matter.rb, line 69 def data @enhanced_data ||= ::Middleman::Util.recursively_enhance(raw_data).freeze end
ignored?()
click to toggle source
Calls superclass method
# File lib/middleman-core/core_extensions/front_matter.rb, line 51 def ignored? if !proxy? && raw_data[:ignored] == true true else super end end
raw_data()
click to toggle source
This page’s frontmatter without being enhanced for access by either symbols or strings. Used internally @private @return [Hash]
# File lib/middleman-core/core_extensions/front_matter.rb, line 63 def raw_data app.extensions[:frontmatter].data(source_file).first end