Closed swaylock closed 3 years ago
When I embed the TOC component directly into the sidebar of my application using the following notation:
<TOC />
The table of contents is rendered as expected. However, the classes on the TOC items are not being updated with the "active" class when you scroll.
I've tried the following in the plugin config:
[ "@vuepress/active-header-links", { sidebarLinkSelector: "div.toc-menu li a", }, ],
But that doesn't work.
I wonder if we were to (optionally) add the sidebar-link class to the toc items, that may just solve it...
sidebar-link
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What problem does the feature solve?
When I embed the TOC component directly into the sidebar of my application using the following notation:
<TOC />
The table of contents is rendered as expected. However, the classes on the TOC items are not being updated with the "active" class when you scroll.
Proposed solution
I've tried the following in the plugin config:
But that doesn't work.
I wonder if we were to (optionally) add the
sidebar-link
class to the toc items, that may just solve it...