Module: Jekyll::TableOfContentsFilter

Defined in:
lib/jekyll-toc.rb

Instance Method Summary collapse

Instance Method Details

#inject_anchors(html) ⇒ Object



21
22
23
24
# File 'lib/jekyll-toc.rb', line 21

def inject_anchors(html)
  return html unless toc_enabled?
  ::Jekyll::TableOfContents::Parser.new(html, toc_config).inject_anchors_into_html
end

#toc(html) ⇒ Object



26
27
28
29
# File 'lib/jekyll-toc.rb', line 26

def toc(html)
  return html unless toc_enabled?
  ::Jekyll::TableOfContents::Parser.new(html, toc_config).toc
end

#toc_only(html) ⇒ Object



16
17
18
19
# File 'lib/jekyll-toc.rb', line 16

def toc_only(html)
  return html unless toc_enabled?
  ::Jekyll::TableOfContents::Parser.new(html, toc_config).build_toc
end