mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user