remark-heading-id

The remark plugin for supporting custom heading id also including default id

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
remark-heading-id
2511.0.17 months ago5 years agoMinified + gzip package size for remark-heading-id in KB

Readme

remark-heading-id
Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits
The remark plugin for supporting custom heading id and Default Id

Custom Heading Input

### My Great Heading {#custom-id}

Custom Heading Output

<h3 id="custom-id">My Great Heading</h3>

API

This package exports no identifiers. The default export is remarkHeaderId.
unified().use(remarkHeadingId[, options])

options

Configuration (optional).

options.defaults

Whether to add default titles based on the title text (boolean, default: false).
Default Heading Input
### My Great Heading
Default Heading Output
<h3 id="my-great-heading">My Great Heading</h3>

Contributing

  • Fork it!
  • Create your new branch:
git checkout -b feature-new or git checkout -b fix-which-bug
  • Start your magic work now
  • Make sure npm test passes
  • Commit your changes:
git commit -am 'feat: some description (close #123)' or git commit -am 'fix: some description (fix #123)'
  • Push to the branch: git push
  • Submit a pull request :)

Authors

This library is written and maintained by imcuttle, moyuyc95@gmail.com.

License

MIT - imcuttle 🐟