module Jekyll::Algolia::FileBrowser

def self.metadata(file)

slug, type and url
well as more specific fields like the collection name, date timestamp,
It contains both the raw metadata extracted from the front-matter, as

file - The Jekyll file

Public: Return a hash of all the file metadata
def self.metadata(file)
  raw_data = raw_data(file)
  specific_data = {
    collection: collection(file),
    tags: tags(file),
    categories: categories(file),
    date: date(file),
    excerpt_html: excerpt_html(file),
    excerpt_text: excerpt_text(file),
    slug: slug(file),
    type: type(file),
    url: url(file)
  }
  metadata = Utils.compact_empty(raw_data.merge(specific_data))
  metadata
end