rehype-sectionize-headings
Create sections based on h2 and h3 headings in Rehype
Last updated 2 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rehype-sectionize-headings 
SYNC missed versions from official npm registry.



rehype-sectionize-headings

Separates headings into sections in Rehype


rehype-sectionize-headings Creates sections based on h2 and h3 headings in Rehype.

Usage

To wrap h2's and h3's:

import wrap from 'rehype-sectionize-headings'

hast = wrap(hast)

Or to specify class names:

hast = wrap(hast, {
  h2: {
    sectionClass: ['h2-section'],
    bodyClass: ['body']
  },
  h3: {
    sectionClass: ['h3-section'],
    bodyClass: ['body']
  }
})

Thanks

rehype-sectionize-headings © 2018+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

 

Current Tags

  • 1.0.0-rc.1                                ...           latest (2 years ago)
  • 1.0.0-rc.3                                ...           next (2 years ago)

3 Versions

  • 1.0.0-rc.3                                ...           2 years ago
  • 1.0.0-rc.2                                ...           2 years ago
  • 1.0.0-rc.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 19
Last Day 2
Last Week 11
Last Month 137
Dependencies (0)
None
Dev Dependencies (12)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |