Method: Jekyll::Collection#entries

Defined in:
lib/jekyll/collection.rb

#entriesObject

All the entries in this collection.

Returns an Array of file paths to the documents in this collection

relative to the collection's directory


76
77
78
79
80
81
82
83
84
85
86
# File 'lib/jekyll/collection.rb', line 76

def entries
  return [] unless exists?

  @entries ||= begin
    collection_dir_slash = "#{collection_dir}/"
    Utils.safe_glob(collection_dir, ["**", "*"], File::FNM_DOTMATCH).map do |entry|
      entry[collection_dir_slash] = ""
      entry
    end
  end
end