{"id":20495326,"url":"https://github.com/kevinast/gitbook-plugin-folding-menu","last_synced_at":"2025-06-17T00:37:03.079Z","repository":{"id":92033501,"uuid":"147875736","full_name":"KevinAst/gitbook-plugin-folding-menu","owner":"KevinAst","description":"GitBook plugin that \"tames\" large left-nav menus by visualizing one section at a time.","archived":false,"fork":false,"pushed_at":"2018-09-08T20:04:02.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T23:48:51.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KevinAst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-07T21:18:24.000Z","updated_at":"2020-07-05T21:40:20.000Z","dependencies_parsed_at":"2023-03-13T17:36:06.044Z","dependency_job_id":null,"html_url":"https://github.com/KevinAst/gitbook-plugin-folding-menu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KevinAst/gitbook-plugin-folding-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAst%2Fgitbook-plugin-folding-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAst%2Fgitbook-plugin-folding-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAst%2Fgitbook-plugin-folding-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAst%2Fgitbook-plugin-folding-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinAst","download_url":"https://codeload.github.com/KevinAst/gitbook-plugin-folding-menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAst%2Fgitbook-plugin-folding-menu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260268632,"owners_count":22983601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T17:45:27.300Z","updated_at":"2025-06-17T00:37:02.634Z","avatar_url":"https://github.com/KevinAst.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitbook-plugin-folding-menu\n\nThis gitbook plugin **manages large left-nav menus** by **visualizing only\none section at a time** _(the active section)_.\n\n\u003c!--- Badges for CI Builds ---\u003e \n\n[![NPM Version Badge](https://img.shields.io/npm/v/gitbook-plugin-folding-menu.svg)](https://www.npmjs.com/package/gitbook-plugin-folding-menu)\n\n\n## At a Glance\n\n- [Overview]\n- [Install]\n- [Configuration]\n- [Revision History]\n  * [v1.0.1] - Added Configuration *(September 8, 2018)*\n  * [v1.0.0] - Initial Release *(September 7, 2018)*\n\n\n## Overview\n\nThe high-level points of interest are:\n\n- On initial display, only the top-level menu items are displayed.\n\n- Navigating to a section with sub-content will dynamically expand it,\n  collapsing any prior section.\n\n- The active section will expose the entire sub-menu depth _(i.e. all\n  it's ancestry, not just direct children)_.\n\n- Navigating between sections continues to expand only the active\n  section _(expanding the active section while collapsing any section\n  previously expanded)_.\n\n- **Animation is used** to make the user experience more intuitive\n  _(i.e. they can visually see what is happening)_!\n\n- Sections that are composed of multiple pages are supported.\n\nThis plugin has the effect of \"taming\" a big unruly menu structure, by\nexposing only one section at a time, making it more intuitive for\nend-user consumption.\n\nYou can **see this in action** at: https://feature-u.js.org/ _(one of\nmy open source projects)_.\n\nThis project is a significant improvement on other similar plugins.\n\n## Install\n\n1. Add the `\"folding-menu\"` plugin to your **book.json** file:\n\n   **book.json**   \n   ```js\n   {\n     ...\n     \"plugins\": [\n       ... other plugins you may be using\n       \"folding-menu\"\n     ]\n     ...\n   }\n   ```\n   \n2. Install the plugin using **one** of the following options _(based on your gitbook usage)_:\n   \n   - For https://legacy.gitbook.com/ usage, plugins are automatically installed.\n   \n   - For local gitbook usage run `gitbook install` to install and prepare\n     all plugins for your books:\n   \n     ```shell\n     gitbook install\n     ```\n   \n   - For technical users _(ex: open source documentation)_, install the\n     plugin to your **devDependencies** as follows:\n   \n     ```shell\n     npm install --save-dev gitbook-plugin-folding-menu\n     ```\n\n\n## Configuration\n\nYou may optionally supply the following configuration to this plugin:\n\n\u003cul\u003e\u003c!--- indentation hack for github - other attempts with style is stripped (be careful with number bullets) ---\u003e \n\n**book.json**   \n```js\n{\n  ...\n  \"pluginsConfig\": {\n    \"folding-menu\":\t{\n      \"animationDuration\": 500,\n      \"sticky\":            true\n    }\n  }\n  ...\n}\n```\n\n\u003c/ul\u003e\n\n- **animationDuration** - The animation duration in mills ... use 0\n  (zero) to disable animation ... **DEFAULT: 400**\n\n- **sticky** - Leave the last section expanded when a the current\n  active section has NO sub-content ... **DEFAULT: false**\n\n\n## Revision History\n\n\nRelease  | What                                            | *When*\n---------|-------------------------------------------------|------------------\n[v1.0.1] | Added Configuration                             | *September 8, 2018*\n[v1.0.0] | Initial Release                                 | *September 7, 2018*\n\n\n\n\u003c!-- *** RELEASE *************************************************************** --\u003e\n\n### v1.0.1 - Added Configuration *(September 8, 2018)*\n\n\u003cul\u003e\u003cul\u003e\u003c!--- indentation hack for github - other attempts with style is stripped (be careful with number bullets) ---\u003e \n\n[GitHub Content](https://github.com/KevinAst/gitbook-plugin-folding-menu/tree/v1.0.1)\n\u0026bull;\n[GitHub Release](https://github.com/KevinAst/gitbook-plugin-folding-menu/releases/tag/v1.0.1)\n\u0026bull;\n[Diff](https://github.com/KevinAst/gitbook-plugin-folding-menu/compare/v1.0.0...v1.0.1)\n\n**NOTE**: This release is a **non-breaking change** _(i.e. no API was affected)_.\n\n- This plugin is now configurable _(see: [Configuration])_.\n\n\u003c/ul\u003e\u003c/ul\u003e\n\n\n\n\u003c!-- *** RELEASE *************************************************************** --\u003e\n\n### v1.0.0 - Initial Release *(September 7, 2018)*\n\n\u003cul\u003e\u003cul\u003e\u003c!--- indentation hack for github - other attempts with style is stripped (be careful with number bullets) ---\u003e \n\n[GitHub Content](https://github.com/KevinAst/gitbook-plugin-folding-menu/tree/v1.0.0)\n\u0026bull;\n[GitHub Release](https://github.com/KevinAst/gitbook-plugin-folding-menu/releases/tag/v1.0.0)\n\n**This is where it all began ...**\n\n\u003c/ul\u003e\u003c/ul\u003e\n\n\n\n\n\u003c!--- *** REFERENCE LINKS *** ---\u003e \n[Overview]:          #overview\n[Install]:           #install\n[Configuration]:     #configuration\n[Revision History]:  #revision-history\n [v1.0.1]:           #v101---added-configuration-september-8-2018\n [v1.0.0]:           #v100---initial-release-september-7-2018\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinast%2Fgitbook-plugin-folding-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinast%2Fgitbook-plugin-folding-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinast%2Fgitbook-plugin-folding-menu/lists"}