Module: Middleman::CoreExtensions::Data

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

Overview

The data extension parses YAML and JSON files in the data/ directory and makes them available to config.rb, templates and extensions

Defined Under Namespace

Modules: InstanceMethods Classes: DataStore

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object Also known as: included



11
12
13
14
15
16
17
18
# File 'lib/middleman-core/core_extensions/data.rb', line 11

def registered(app)
  # Data formats
  require "yaml"
  require "active_support/json"

  app.set :data_dir, "data"
  app.send :include, InstanceMethods
end