Sha256: 584b65cf172c4b357698288ce7adc25c7ea050a95a9df196f04227a4ad7e31e9
Contents?: true
Size: 1.36 KB
Versions: 3
Compression:
Stored size: 1.36 KB
Contents
# Gollum::DescendantTree DescendantTree adds a helper function, similar to Gollum's Table of Contents (TOC), which adds an unordered list of links to all descendants of the current page. ## Installation Add this line to your Gollum application's Gemfile: gem 'gollum-descendant_tree' And then execute: $ bundle install Or install it yourself as: $ gem install gollum-descendant_tree ## Setup Then, add to your Gollum app's `config.ru`: require 'gollum/descendant_tree' Create a custom markup class if you don't already have one, or just `include Gollum::DescendantTree` in your existing class. # lib/gollum/my_markup.rb class MyMarkup < Gollum::Markup include Gollum::DescendantTree end Finally, in `config.ru`, tell Gollum to use your class instead of its default one. Precious::App.set(:wiki_options, { :markup_classes => { :markdown => MyMarkup } }) ## Usage Simply add `[[_TREE_]]` to any page of your wiki to add an unordered list of descendants to the page. If you're using custom css, you can target `ul.tree` for styling the list. ## Automated Tests $ bundle exec rspec spec ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gollum-descendant_tree-0.0.8 | README.md |
gollum-descendant_tree-0.0.7 | README.md |
gollum-descendant_tree-0.0.6 | README.md |