module Jekyll::Algolia::FileBrowser
def self.absolute_path(file)
(pages) or as an absolute paths (posts and static assets). We make sure
Jekyll handles the .path property of some files as relative to the root
file - The Jekyll file to inspect
Public: Return the absolute path of a Jekyll file
def self.absolute_path(file) pathname = Pathname.new(file.path) return pathname.cleanpath.to_s if pathname.absolute? File.join(Configurator.get('source'), file.path) end