Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Add reference to rehype, rehype-slug in readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 17, 2017
1 parent 64d41f3 commit 0dfc244
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
Add anchors to [**remark**][remark] heading nodes using GitHub’s
algorithm.

> Works great with [**remark-html**][html], used by [**remark-toc**][toc].
> :warning: This is often useful when compiling to HTML. If you’re doing that,
> it’s probably smarter to use [`remark-rehype`][remark-rehype] and
> [`rehype-slug`][rehype-slug] and benefit from the [**rehype**][rehype]
> ecosystem.
## Installation

Expand Down Expand Up @@ -66,11 +69,17 @@ Now, running `node example` yields:

Adds slugs to markdown headings.

Uses [**github-slugger**][ghslug] (thus creating GitHub style `id`s).

Sets `data.id`, `data.hProperties.id` on heading nodes. The first can be
used by any plugin as a unique identifier, the second tells **remark-html**
to use its value as an `id` attribute. **remark-slug** does not overwrite
these values when they already exist.

## Related

* [`rehype-slug`][rehype-slug] — Add slugs to headings in HTML

## License

[MIT][license] © [Titus Wormer][author]
Expand All @@ -97,6 +106,10 @@ these values when they already exist.

[remark]: https://github.com/wooorm/remark

[html]: https://github.com/wooorm/remark-html
[ghslug]: https://github.com/Flet/github-slugger

[rehype-slug]: https://github.com/wooorm/rehype-slug

[remark-rehype]: https://github.com/wooorm/remark-rehype

[toc]: https://github.com/wooorm/remark-toc
[rehype]: https://github.com/wooorm/rehype

0 comments on commit 0dfc244

Please sign in to comment.