def collections
      return @collections if defined?(@collections)

      @collections = if config["collections"].is_a?(Array)
                       config["collections"].map { |c| [c, {}] }.to_h
                     elsif config["collections"].is_a?(Hash)
                       config["collections"]
                     else
                       {}
                     end

      @collections = normalize_posts_meta(@collections)
      @collections.each_value do |meta|
        meta["categories"] = (meta["categories"] || []).to_set
      end

      @collections
    end
def collections
      return @collections if defined?(@collections)

      @collections = if config["collections"].is_a?(Array)
                       config["collections"].map { |c| [c, {}] }.to_h
                     elsif config["collections"].is_a?(Hash)
                       config["collections"]
                     else
                       {}
                     end

      @collections = normalize_posts_meta(@collections)
      @collections.each_value do |meta|
        meta["categories"] = (meta["categories"] || []).to_set
      end

      @collections
    end
Returns a hash representing all collections to be processed and their metadata
 in the form of { collection_name => { categories = [...], path = "..." } }