Sha256: 8e8db8a13a4294eb303e5858d1edf7574bdb12c6ecfe25773fcba2a9e6c19b3b
Contents?: true
Size: 396 Bytes
Versions: 6
Compression:
Stored size: 396 Bytes
Contents
module Gollum class Macro class GlobalTOC < Gollum::Macro def render(title = "Global Table of Contents") if @wiki.pages.size > 0 result = '<ul>' + @wiki.pages.map { |p| "<li><a href=\"/#{p.url_path}\">#{p.url_path}</a></li>" }.join + '</ul>' end "<div class=\"toc\"><div class=\"toc-title\">#{title}</div>#{result}</div>" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems