# @vuepress/plugin-active-header-links

A plugin of automatically activating sidebar links when page scrolls

# Install

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

# Usage

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

# Passing Options

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

# Options

# sidebarLinkSelector

  • Type: string
  • Default: .sidebar-link

# headerAnchorSelector

  • Type: string
  • Default: .header-anchor
上次更新: 2020-4-8 13:51:00