Skip to content

TOC sidebar expands to page for links but not groups #2724

Closed
@hamishwillee

Description

@hamishwillee
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

Open any of these links:

Note that the sidebar does not open to the current page in these cases - it remains "unexpanded". That is because these are sidebar groups.

Note that any item which is a link (not a group) - e.g. a child node with no children - then the page does open to the link - see https://docs.px4.io/master/en/modules/modules_command.html#dyn

Problem Repo: https://github.com/PX4/PX4-user_guide

What is expected?

If you open a page then the sidebar should expand to display that page.

What is actually happening?

However only pages that are bottom level links are opened. Pages that are groups are not opened.

Other relevant information

This is reproducable on builds in windows and in ubuntu.

This particular project is built from root in the normal way - ie yarn docs:dev. It is not relevant to this problem, but the tree is built dynamically from a file named SUMMARY.md using .vuepress/get_sidebar.js

Can be reproduced in Windows and Ubuntu builds.

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: Windows 10 10.0.18363
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  Binaries:
    Node: 12.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 86.0.4240.198
    Edge: Spartan (44.18362.449.0)
  npmPackages:
    @vuepress/core:  1.7.1
    @vuepress/theme-default:  1.7.1
    vuepress: ^1.5.4 => 1.7.1
  npmGlobalPackages:
    vuepress: Not Found

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