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:
parent
5b0e2a294d
commit
537235c38b
|
@ -74,6 +74,14 @@ module Jekyll
|
||||||
end
|
end
|
||||||
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
|
# Read and parse all yaml files under <dir> and add them to the
|
||||||
# <data> variable.
|
# <data> variable.
|
||||||
#
|
#
|
||||||
|
|
|
@ -131,7 +131,7 @@ module Jekyll
|
||||||
def read
|
def read
|
||||||
self.layouts = LayoutReader.new(self).read
|
self.layouts = LayoutReader.new(self).read
|
||||||
read_directories
|
read_directories
|
||||||
read_data(config['data_source'])
|
reader.read_data(config['data_source'])
|
||||||
read_collections
|
read_collections
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -206,14 +206,6 @@ module Jekyll
|
||||||
end
|
end
|
||||||
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
|
# Read in all collections specified in the configuration
|
||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
|
|
Loading…
Reference in New Issue