module Jekyll::Algolia::FileBrowser

def self.excerpt_html(file)

Only collections (including posts) have an excerpt. Pages don't.

file - The Jekyll file

Public: Returns the HTML version of the excerpt
def self.excerpt_html(file)
  excerpt = file.data['excerpt']
  return nil if excerpt.nil?
  excerpt.to_s.tr("\n", ' ').strip
end