1# frozen_string_literal: true
2
3module Jekyll
4 class CollectionReader
5 SPECIAL_COLLECTIONS = %w(posts data).freeze
6
7 attr_reader :site, :content
8 def initialize(site)
9 @site = site
10 @content = {}
11 end
12
13 # Read in all collections specified in the configuration
14 #
15 # Returns nothing.
16 def read
17 site.collections.each_value do |collection|
18 collection.read unless SPECIAL_COLLECTIONS.include?(collection.label)
19 end
20 end
21 end
22end
23