mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Extracted read_data from site.rb into reader.rb
- Extracted - Updated References - Ran Tests Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
This commit is contained in:
@@ -74,6 +74,14 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
# Read and parse all yaml files under <source>/<dir>
|
||||
#
|
||||
# Returns nothing
|
||||
def read_data(dir)
|
||||
base = in_source_dir(dir)
|
||||
read_data_to(base, site.data)
|
||||
end
|
||||
|
||||
# Read and parse all yaml files under <dir> and add them to the
|
||||
# <data> variable.
|
||||
#
|
||||
|
||||
@@ -131,7 +131,7 @@ module Jekyll
|
||||
def read
|
||||
self.layouts = LayoutReader.new(self).read
|
||||
read_directories
|
||||
read_data(config['data_source'])
|
||||
reader.read_data(config['data_source'])
|
||||
read_collections
|
||||
end
|
||||
|
||||
@@ -206,14 +206,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
# Read and parse all yaml files under <source>/<dir>
|
||||
#
|
||||
# Returns nothing
|
||||
def read_data(dir)
|
||||
base = reader.in_source_dir(dir)
|
||||
reader.read_data_to(base, self.data)
|
||||
end
|
||||
|
||||
# Read in all collections specified in the configuration
|
||||
#
|
||||
# Returns nothing.
|
||||
|
||||
Reference in New Issue
Block a user