class Jekyll::ArchivesV2::Archive

def initialize(site, title, type, collection_name, documents)

documents - The array of documents that belong in this archive.
collection_name - The name of the collection.
type - The type of archive. Can be one of "year", "month", "day", "category", or "tag"
e.g. { :year => 2014, :month => 08 } or "my-category" or "my-tag".
title - The name of the tag/category or a Hash of the year/month/day in case of date.
site - The Site object.

Initialize a new Archive page
def initialize(site, title, type, collection_name, documents)
  @site   = site
  @documents  = documents
  @type   = type
  @title  = title
  @collection_name = collection_name
  @config = site.config["jekyll-archives"][collection_name]
  @slug   = slugify_string_title
  # Use ".html" for file extension and url for path
  @ext  = File.extname(relative_path)
  @path = relative_path
  @name = File.basename(relative_path, @ext)
  @data = {
    "layout" => layout,
  }
  @content = ""
end