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 Request] Add property to ignore folder level #105

Open
sharpchen opened this issue Nov 17, 2023 · 2 comments
Open

[Feature Request] Add property to ignore folder level #105

sharpchen opened this issue Nov 17, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sharpchen
Copy link

Hi, thank you for your wonderful extension! I've encountered a problem due to what I have done to organize my folder structure.

Feature Motivation

Here's an example structure, I'd like to ignore the sub1 level, regard file.md as a child of sub1.

docs
|
+---document
|   +---folder1
|   |   +---sub1
|   |   |   +---chapter1
|   |   |       +---file.md
|   |   +---demo
|   +---folder2 
|
+---   

Feature Description

Could let the property like this, since sub1 is the second level from the /doc/document

sidebar: generateSidebar({
            documentRootPath: '/docs/document',
            folderLevelIgnored: [2]
        }),
@sharpchen sharpchen added the bug Something isn't working label Nov 17, 2023
@jooy2
Copy link
Owner

jooy2 commented Nov 21, 2023

Hello. Thank you for using vitepress-sidebar.

You can use the excludeFolders option to not show certain folders in the menu.
If the above option is not what you want, does your description mean that you don't want to show the sub1 folder, but you want to show the file.md file?

Regards,

@sharpchen
Copy link
Author

I mis-expressed. Yes I'd like to ignore sub1, then the structure should be folder1->chapter1->file.md. All files and folders displayed should be under the folder1.

@jooy2 jooy2 added enhancement New feature or request and removed bug Something isn't working labels Dec 12, 2023
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