module Gollum class Macro class Navigation < Gollum::Macro def render(title = "Navigate in the TOC", toc_root_path = ::File.dirname(@page.path), full_path = false) if @wiki.pages.size > 0 list_items = @wiki.pages.map do |page| if page.url_path.start_with?(toc_root_path) path_display = full_path ? page.url_path_display : page.url_path_display.sub(toc_root_path.gsub("-", " "), "").sub(/^\//,'') "
  • #{path_display}
  • " end end result = "" end "
    #{title}
    #{result}
    " end end end end