@vuepress/plugin-active-header-links

A plugin of automatically activating sidebar links when page scrolls

Install

  1. yarn add -D @vuepress/plugin-active-header-links
  2. # OR npm install -D @vuepress/plugin-active-header-links

Usage

  1. module.exports = {
  2. plugins: ['@vuepress/active-header-links']
  3. }

Passing Options

  1. module.exports = {
  2. plugins: ['@vuepress/active-header-links', {
  3. sidebarLinkSelector: '.sidebar-link',
  4. headerAnchorSelector: '.header-anchor'
  5. }]
  6. }

Options

sidebarLinkSelector

  • Type: string
  • Default: .sidebar-link

headerAnchorSelector

  • Type: string
  • Default: .header-anchor