Module: Jekyll::TableOfContentsFilter
- Defined in:
- lib/jekyll-toc-plus.rb
Overview
Jekyll Table of Contents filter plugin
Instance Method Summary collapse
- #inject_anchors(html) ⇒ Object
- #toc(html) ⇒ Object
-
#toc_only(html) ⇒ Object
Deprecated method.
Instance Method Details
#inject_anchors(html) ⇒ Object
36 37 38 39 40 |
# File 'lib/jekyll-toc-plus.rb', line 36 def inject_anchors(html) return html unless toc_enabled? TableOfContents::Parser.new(html, toc_config).inject_anchors_into_html end |
#toc(html) ⇒ Object
42 43 44 45 46 |
# File 'lib/jekyll-toc-plus.rb', line 42 def toc(html) return html unless toc_enabled? TableOfContents::Parser.new(html, toc_config).toc end |
#toc_only(html) ⇒ Object
Deprecated method. Removed in v1.0.
30 31 32 33 34 |
# File 'lib/jekyll-toc-plus.rb', line 30 def toc_only(html) return '' unless toc_enabled? TableOfContents::Parser.new(html, toc_config).build_toc end |