Skip to content

Support custom heading classes in addition to IDs #11628

@mering

Description

@mering

Have you read the Contributing Guidelines on issues?

Description

In addition to custom heading IDs, also allow setting custom heading classes.

Has this been requested on Canny?

No response

Motivation

This allows custom styling via CSS or filtering via JS.

API design

For example, I can imagine a syntax as follows:

# Heading {#id .class1 .class2}

Have you tried building it?

This could be implemented in the heading remark plugin where custom IDs are already processed.

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.status: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions