Closed nruffing closed 8 months ago
@nruffing I have pushed some changes directly.
I found that some errors are thrown when clicking the auto sidebar. Please resolve it and better to add corresponding e2e testings for clicking them. Thanks!
I don't think this is because the code change, see https://github.com/vuepress/ecosystem/issues/27 I belived this could be solved by https://github.com/vuepress/ecosystem/pull/24 naturally once https://github.com/vuepress/core/pull/1447 is merged upstream
I see. Let's release core first
I would suggest adding the new option as 'heading` instead of 'auto', as it would be great if we can also support 'structure', see https://theme-hope.vuejs.press/guide/layout/sidebar.html#generate-from-file-structure The docs sidebar is using "structure" keyword.
@nruffing
I would suggest adding the new option as 'heading` instead of 'auto', as it would be great if we can also support 'structure', see https://theme-hope.vuejs.press/guide/layout/sidebar.html#generate-from-file-structure The docs sidebar is using "structure" keyword.
@nruffing
I see. That makes sense. I am going to make that change and reopen this PR.
Before submitting the PR, please make sure you do the following
close vuepress/core#123
).What is the purpose of this pull request?
Description
The auto sidebar feature of the default theme is quite useful, especially in cases where the pages are autogenerated documentation from something like TypeDoc.
Currently you can only use the auto feature on all pages or manually specify the sidebar for every page. It would be great if you could turn the feature on per page as well.
This PR also contains the initial setup of the e2e tests for the default theme and a couple e2e tests of this new feature.
Screenshots
Before
After
closes vuepress/core#17 closes vuepress/core#19