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 = excerpt_raw(file)
  return nil if excerpt.nil?
  return nil if excerpt.empty?
  excerpt.to_s.tr("\n", ' ').strip
end