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

[Feature]: Outline level support in front matter config #835

Open
hustcer opened this issue Mar 21, 2024 · 0 comments
Open

[Feature]: Outline level support in front matter config #835

hustcer opened this issue Mar 21, 2024 · 0 comments

Comments

@hustcer
Copy link

hustcer commented Mar 21, 2024

What problem does this feature solve?

Currently the outline in front matter config can be set to false to disable it, and if it was enabled the outline will be generated automatically like this one: https://rspress.dev/guide/start/introduction.html The outline was extracted from h2/h3/h4 and it satisfy most use cases. However, in some rare cases I just need only one level outline extracted from h2 that's:
from:

  • L1.0
    • L1.0.1
    • L1.0.2
      • L1.0.2.1
  • L1.1
  • L1.2

to:

  • L1.0
  • L1.1
  • L1.2

What does the proposed API look like?

The front matter config of outline could be set to false, 1, 2, 3 or add another outlineLevel config which accept 1, 2, 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant