Skip to content

New IdAttributePlugin will add id attributes to your headings #3363

@zachleat

Description

@zachleat

Rather than rely on template language specific plugins for id attributes, a la this one https://www.npmjs.com/package/markdown-it-anchor we can instead make use of the existing posthtml infrastructure used by the HTML base plugin and the input path to URL plugins to add an id attributes to content.

This then pairs nicely with a web component to add anchors to headings for the UX piece, a la @daviddarneshttps://github.com/daviddarnes/heading-anchors

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions