Skip to content

Sidebar should update in sub-folders #785

Closed
@tristan957

Description

@tristan957

Feature request

Say I have a structure like this:
image

and my config.js file looks like:

module.exports = {
    themeConfig: {
        nav: [
            { text: "Home", link: "/"},
            { text: "Projects", link: "/"},
            { text: "Wiki", link: "/wiki/"}
        ],
        sidebar: {
            "/wiki/": [
                "",
                "vscode/",
            ],
            "/wiki/vscode/": [
                "",
                "extensions/",
                "go/"
            ],
            "/wiki/vscode/extensions/": [
                "",
                "python",
                "c-cpp"
            ],
            "/wiki/vscode/go/": [
                "",
                "debugging"
            ]
        }
    }
}

I only get to see the sidebar of the /wiki/ directory. When I am in the /vscode/ directory, I want to see the sidebar I defined. Unfortunately all the sidebars under /wiki/ are the same /wiki/ sidebar. The sidebar should be updated on every sub-folder

What problem does this feature solve?

Allows for sub-folders to have unique sidebars

What does the proposed API look like?

Nothing would have to change about config.js, although it might help to allow for nesting like

sidebar: {
    '/wiki/': [
        '',
        'vscode/': [
            '',
            'go/' //,
            // ...
        }
    }
}

How should this be implemented in your opinion?

Similarly to how it is already implemented

Are you willing to work on this yourself?**

I would be willing if I knew where to look.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions