class Jekyll::Collection

Public Instance Methods

read() click to toggle source

make jekyll collections aside from _posts also convert org files.

# File lib/jekyll-org.rb, line 56
def read
  filtered_entries.each do |file_path|
    full_path = collection_dir(file_path)
    next if File.directory?(full_path)

    if Utils.has_yaml_header?(full_path) ||
       Jekyll::Converters::Org.matches_path(full_path)
      read_document(full_path)
    else
      read_static_file(file_path, full_path)
    end
  end

  # TODO remove support for jekyll 3 on 4s release
  (Jekyll::VERSION < '4.0') ? docs.sort! : sort_docs!
end