Extracted `read_collections` 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
2857350df1
commit
2f88a0c0a1
|
@ -180,6 +180,15 @@ module Jekyll
|
|||
end
|
||||
end
|
||||
|
||||
# Read in all collections specified in the configuration
|
||||
#
|
||||
# Returns nothing.
|
||||
def read_collections
|
||||
site.collections.each do |_, collection|
|
||||
collection.read unless collection.label.eql?("data")
|
||||
end
|
||||
end
|
||||
|
||||
def sanitize_filename(name)
|
||||
name.gsub!(/[^\w\s_-]+/, '')
|
||||
name.gsub!(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
|
||||
|
|
|
@ -132,16 +132,7 @@ module Jekyll
|
|||
self.layouts = LayoutReader.new(self).read
|
||||
reader.read_directories
|
||||
reader.read_data(config['data_source'])
|
||||
read_collections
|
||||
end
|
||||
|
||||
# Read in all collections specified in the configuration
|
||||
#
|
||||
# Returns nothing.
|
||||
def read_collections
|
||||
collections.each do |_, collection|
|
||||
collection.read unless collection.label.eql?("data")
|
||||
end
|
||||
reader.read_collections
|
||||
end
|
||||
|
||||
# Run each of the Generators.
|
||||
|
|
Loading…
Reference in New Issue