format_file

in jekyll/plugins/recently_updated_generator.rb [120:138]


  def format_file(file, pages_by_path, toc_by_path, toc_by_id)
    
    if not pages_by_path.key?(file) then
      puts ""
      puts "WARNING: File has been moved or deleted without adding a redirect: #{file}"
      puts ""
      return nil
    end
    raise "Page is not in ToC: #{file}" unless toc_by_path.key?(file)

    page = pages_by_path[file]
    title = page.data['title']
    toc_entry = toc_by_path[file]
    title = toc_entry[:title]
    path = format_path(toc_entry, toc_by_id)

    "* #{path} **[#{title}](/#{file})**"
  end