Back to Explore

rehypejs/rehype-slug

GitHub
1 watchersOpen source

Last release: 8/31/2023

rehype-slug is a unified, rehype plugin that adds `id` attributes to heading elements (`<h1>` through `<h6>`) based on their text, useful for linking to specific document sections. It matches GitHub-style slugging (using github-slugger) and can be configured with an optional `prefix` for the generated `id`s.

Project status

  • The upstream repository appears not to be actively maintained recently, with the last observed push on 2023-08-31 and the newest recorded update being 6.0.0 on 2023-08-31.
  • The apparent update cadence is low, with updates spaced widely over time (e.g., 5.0.1 in 2021, 5.1.0 in 2022, 6.0.0 in 2023).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 6.0.0

    8/31/2023

    rehype-slug 6.0.0 is a major release that updates the project to modern unified/rehype ecosystem versions, and changes packaging to use the `exports` field. It also updates CI and tooling to current Node support.

    Breaking
  • 5.1.0

    10/31/2022

    rehype-slug 5.1.0 adds support for prefixing generated heading ids via a new `options.prefix` option. The plugin’s public usage and TypeScript types were updated accordingly, and several dependencies/dev tools were bumped.

    Features
  • 5.0.1

    12/30/2021

    Release 5.0.1 is presented as a documentation-only update. However, the diff also includes a change to the JSDoc TypeScript plugin typing in index.js, plus various devDependency and tooling version bumps.