Skip to content

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.