1.0.5 • Published 7 years ago

hexo-toc-ext v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

hexo-toc-ext

npm: Package Quality Build Status

Added chapter format to hexo-toc.

Image

  • indent: false
  • indent: true
  • firstHeaderTagSkip: true

Install

npm install hexo-toc-ext --save

Options

All the options of markdown-toc, slugify function, and heading anchor options can be specified as follow in you _config.yml:

toc:
  maxdepth: 3
  class: toc
  slugify: transliteration
  indent: true # default(true)
  firstHeaderTagSkip: false # default(false)
  anchor:
    contents:
      style: contents-header
    heading:
      style: header-anchor
      notIncludeHeading: false # default(false)
  • maxdepth: Use headings whose depth is at most maxdepth.
  • class: The CSS Class for the toc. (Default is false)
  • slugify: Choose which slugify function you want to use. Currently support uslug (Default) and transliteration.
  • indent: add indent(Default is true)
  • firstHeaderTagSkip: delete first header(Default is false)
  • anchor: Whether should have an anchor for each headings. (Default is false)
    • contents:
      • style: The CSS class for the anchor, (Default is contents-anchor);
    • heading:
      • style: The CSS class for the anchor, (Default is header-anchor);
      • notIncludeHeading: Do not include header in link, (Default is false);

Contributing

Pull requests and stars are highly welcome. For bugs and feature requests, please create an issue.