module Jekyll::OrgPage

Public Instance Methods

read_yaml(base, name, opts = {}) click to toggle source

Don't parse YAML blocks when working with an org file, parse it as an org file and then extracts the settings from there.

Calls superclass method
# File lib/jekyll-org.rb, line 38
def read_yaml(base, name, opts = {})
  extname  = File.extname(name)
  return super unless Jekyll::Converters::Org.matches(extname)
  filename = File.join(base, name)

  self.data ||= Hash.new()
  self.content = File.read(@path || site.in_source_dir(base, name),
                           Utils.merged_file_read_opts(site, opts))
  converter = site.find_converter_instance(Jekyll::Converters::Org)
  parser, settings = converter.parse_org(self.content)

  self.content = converter.actually_convert(parser)
  self.data = Utils.deep_merge_hashes(self.data, settings)
end