Class: Jekyll::RenderTocPro
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::RenderTocPro
- Defined in:
- lib/pro_generate_toc.rb
Instance Method Summary collapse
-
#initialize(tag_name, input, tokens) ⇒ RenderTocPro
constructor
A new instance of RenderTocPro.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, input, tokens) ⇒ RenderTocPro
Returns a new instance of RenderTocPro.
5 6 7 |
# File 'lib/pro_generate_toc.rb', line 5 def initialize(tag_name, input, tokens) super end |
Instance Method Details
#render(context) ⇒ Object
8 9 10 11 12 |
# File 'lib/pro_generate_toc.rb', line 8 def render(context) @doc = Nokogiri::HTML::DocumentFragment.parse(context.registers[:page]['content']) %(<ul id="pro-sidebar" class="js-scroll-nav list-group">\n#{Parser.new(@doc).build_toc_list}</ul>) end |