Module: Middleman::CoreExtensions::FrontMatter::InstanceMethods

Defined in:
lib/middleman-core/core_extensions/front_matter.rb

Instance Method Summary collapse

Instance Method Details

#frontmatter_managerObject

Access the Frontmatter API



211
212
213
# File 'lib/middleman-core/core_extensions/front_matter.rb', line 211

def frontmatter_manager
  @_frontmatter_manager ||= FrontmatterManager.new(self)
end

#template_data_for_file(path) ⇒ String

Get the template data from a path

Parameters:

  • path (String)

Returns:

  • (String)


218
219
220
# File 'lib/middleman-core/core_extensions/front_matter.rb', line 218

def template_data_for_file(path)
  frontmatter_manager.data(path).last
end