-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add Ability to specify how deep page headers should go #984
Comments
This is a much needed feature.
|
Looking into how to code this, Once issue is it seems that currently, the Page.js does not have access to the config file. I have been looking for samples of the |
Welcome to pull requests, This is a much needed feature. |
Heck, even Vuepress's own README contains skipped headings: an |
Picking this up this week. Targeting to have a PR by the end of week |
this is obviously necessary. |
@pianoboysai I believe this was merged in through another PR #1945 after being told to "avoid wasting your time" and let the "feature be implemented by official collaborators" |
Feature request
It would be nice to have the ability to specify how deep the
extractHeaders
method goes.Currently, it has a hard coded value of
['h2', 'h3']
Our current markdown files use
h4
as well in order to handle some table of contents for the page in sidebar form.What problem does this feature solve?
When doing a table of contents in the sidebar, this feature would allow you to specify how deep the TOC should go based on headers.
What does the proposed API look like?
config.js
How should this be implemented in your opinion?
The above would be a themeConfig option and will replace the default hard coded value located at
https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/core/lib/prepare/Page.js#L92
Are you willing to work on this yourself?**
Yes
The text was updated successfully, but these errors were encountered: