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

Allow four levels of sidebar entries #486

Merged
merged 1 commit into from
Jul 19, 2024

Commits on Jul 18, 2024

  1. Allow four levels of sidebar entries

    Currently, the code that generates the navigation sidebar from a
    directory tree stops at the second level of a given top-level section.
    However, some sections include three levels of content. This change
    edits the sidebar generator so it works recursively.
    
    Also fix an issue with the `DocsNavigationItems` component that prevents
    the docs site from highlighting sidebar entries past two levels of
    depth. The component treats a sidebar subsection as "active" if one of
    its entries is equivalent to the current page path.
    
    But if the current page path is a grandchild of a sidebar subsection,
    this means that the component hides the grandchild, since none of the
    children of the subsection is equivalent to the current page. This
    change determines that a sidebar subsection is "active" if the selected
    path _starts with_ the subsection path.
    
    Also edit the CSS padding of navigation links to depend on the current
    level of the navigation menu. This allows for indentation of submenu
    links beyond the second level.
    ptgott committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    1c0d244 View commit details
    Browse the repository at this point in the history