diff --git a/lib/jekyll/reader.rb b/lib/jekyll/reader.rb index 1558197b..fa9bc239 100644 --- a/lib/jekyll/reader.rb +++ b/lib/jekyll/reader.rb @@ -74,6 +74,14 @@ module Jekyll end end + # Read and parse all yaml files under / + # + # 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 and add them to the # variable. # diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index d7186420..c19ba3b1 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -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 / - # - # 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.