Module: Jekyll::TableOfContentsFilter
- Defined in:
- lib/jekyll-toc.rb
Instance Method Summary collapse
Instance Method Details
#inject_anchors(html) ⇒ Object
76 77 78 79 80 81 |
# File 'lib/jekyll-toc.rb', line 76 def inject_anchors(html) page = @context.registers[:page] return html unless page['toc'] Jekyll::TableOfContents::Parser.new(html).inject_anchors_into_html end |
#toc(html) ⇒ Object
83 84 85 86 87 88 |
# File 'lib/jekyll-toc.rb', line 83 def toc(html) page = @context.registers[:page] return html unless page['toc'] Jekyll::TableOfContents::Parser.new(html).toc end |
#toc_only(html) ⇒ Object
69 70 71 72 73 74 |
# File 'lib/jekyll-toc.rb', line 69 def toc_only(html) page = @context.registers[:page] return html unless page['toc'] Jekyll::TableOfContents::Parser.new(html).build_toc end |