2.1.0 • Published 5 years ago

gitbook-plugin-anchorjs v2.1.0

Weekly downloads
274
License
MIT
Repository
github
Last release
5 years ago

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.