Module: Jekyll::TableOfContentsFilter
- Defined in:
- lib/jekyll-toc.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
28 29 30 31 32 |
# File 'lib/jekyll-toc.rb', line 28 def inject_anchors(html) return html unless toc_enabled? TableOfContents::Parser.new(html, toc_config).inject_anchors_into_html end |
#toc(html) ⇒ Object
34 35 36 37 38 |
# File 'lib/jekyll-toc.rb', line 34 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.
22 23 24 25 26 |
# File 'lib/jekyll-toc.rb', line 22 def toc_only(html) return '' unless toc_enabled? TableOfContents::Parser.new(html, toc_config).build_toc end |