Nostalgic Primordial Monster
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

gitbook-plugin-anchorjs

2.1.0 • Public • Published

Anchor.js for Gitbook

Adds deep links to headlines using AnchorJS v4.1.0.

{
  "plugins": ["anchorjs"]
}

The deep links to page sections are initially-hidden and pop into view on hover. Design and behavior can adjusted in book.json:

{
  "pluginsConfig": {
    "anchorjs": {
      "selector": "h2,h3,h4,h5",
      "icon": "#",
      "placement": "left",
      "visible": "always",
      "class": "custom-class another-one",
      "truncate": 64,
      "ariaLabel": "Anchor"
    }
  }
}

See anchor.js docs for details.

install

npm i gitbook-plugin-anchorjs

Downloadsweekly downloads

946

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability