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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i gitbook-plugin-anchorjs

      Weekly Downloads

      70

      Version

      2.1.0

      License

      MIT

      Unpacked Size

      8.18 kB

      Total Files

      6

      Last publish

      Collaborators

      • simran-b