Module: Jekyll::TableOfContentsFilter
- Defined in:
- lib/jekyll-toc.rb
Overview
Jekyll Table of Contents filter plugin
Instance Method Summary collapse
Instance Method Details
#inject_anchors(html) ⇒ Object
24 25 26 27 28 |
# File 'lib/jekyll-toc.rb', line 24 def inject_anchors(html) return html unless toc_enabled? ::Jekyll::TableOfContents::Parser.new(html, toc_config).inject_anchors_into_html end |
#toc(html) ⇒ Object
30 31 32 33 34 |
# File 'lib/jekyll-toc.rb', line 30 def toc(html) return html unless toc_enabled? ::Jekyll::TableOfContents::Parser.new(html, toc_config).toc end |
#toc_only(html) ⇒ Object
18 19 20 21 22 |
# File 'lib/jekyll-toc.rb', line 18 def toc_only(html) return '' unless toc_enabled? ::Jekyll::TableOfContents::Parser.new(html, toc_config).build_toc end |