@islands/headings
TypeScript icon, indicating that this package has built-in type declarations

0.8.2 • Public • Published


@islands/headings

An îles module that injects a rehype plugin to parse headings in MDX documents:

  • 🔗 adds an id to headings and injects an anchor tag to link them

  • 🏷 automatically extracts the title from an <h1> and sets frontmatter.title

  • 📖 sets meta.headings to enable rendering sidebars and table of contents

Usage 🚀

// iles.config.ts
import { defineConfig } from 'iles'

export default defineConfig({
  modules: [
    '@islands/headings',
  ],
})

Readme

Keywords

none

Package Sidebar

Install

npm i @islands/headings

Weekly Downloads

41

Version

0.8.2

License

none

Unpacked Size

10.6 kB

Total Files

7

Last publish

Collaborators

  • elmassimo