Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize which headings are shown in the TOC #1529

Open
mbostock opened this issue Jul 23, 2024 · 1 comment
Open

Customize which headings are shown in the TOC #1529

mbostock opened this issue Jul 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

Currently it’s hardcoded as

h1:not(:first-of-type)[id],
h2:first-child[id],
:not(h1) + h2[id]

Should we allow this to be customizable?

@mbostock mbostock added the enhancement New feature or request label Jul 23, 2024
@Fil
Copy link
Contributor

Fil commented Jul 24, 2024

One issue here is that with multiple levels in the TOC (say, h2, h3), users will want the hierarchy be reflected visually. We could at a minimum provide some classes that reflect the hierarchical level?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants