{"id":20338176,"url":"https://github.com/billryan/gitbook-plugin-etoc","last_synced_at":"2025-04-11T23:11:43.131Z","repository":{"id":143415987,"uuid":"67457361","full_name":"billryan/gitbook-plugin-etoc","owner":"billryan","description":"Elegant toc plugin for GitBook","archived":false,"fork":false,"pushed_at":"2017-07-29T07:36:34.000Z","size":17,"stargazers_count":22,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T23:11:35.082Z","etag":null,"topics":["gitbook","plugin","toc"],"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/billryan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-09-05T23:39:39.000Z","updated_at":"2023-04-10T06:08:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bcc4430-0e98-4694-bd67-c4dd6e8fe38c","html_url":"https://github.com/billryan/gitbook-plugin-etoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billryan%2Fgitbook-plugin-etoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billryan%2Fgitbook-plugin-etoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billryan%2Fgitbook-plugin-etoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billryan%2Fgitbook-plugin-etoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billryan","download_url":"https://codeload.github.com/billryan/gitbook-plugin-etoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492877,"owners_count":21113163,"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":["gitbook","plugin","toc"],"created_at":"2024-11-14T21:11:56.196Z","updated_at":"2025-04-11T23:11:43.109Z","avatar_url":"https://github.com/billryan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitbook-plugin-etoc\n\n[![npm](https://img.shields.io/npm/v/gitbook-plugin-etoc.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-etoc) [![npm](https://img.shields.io/npm/dm/gitbook-plugin-etoc.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-etoc) [![npm](https://img.shields.io/npm/dt/gitbook-plugin-etoc.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-etoc)\n\nThis plugin will add table of content to the page automatically.\nWhen you build the book, it will insert a table of content automatically or to place where you insert `\u003c!-- toc --\u003e`. Sometimes you may want to disable toc on some page, just add `\u003c!-- notoc --\u003e` on the the markdown page.\n\nDemo site ==\u003e https://yuanbin.gitbooks.io/test/content/\n\n## Sample\n\n![screenshot 2016-09-13 23 21 36](https://cloud.githubusercontent.com/assets/1292567/18479788/e05bf126-7a08-11e6-83b4-0322d20fcd94.png)\n\n## Config\n\nAdd `etoc` in `book.json` is enough for most users.\n\n```\n{\n  \"plugin\": [\"etoc\"]\n}\n```\n\nIt will add toc automatically if the markdown page meets following requirements.\n\n- `###` header3 - `mindepth` required to generate toc\n- `##` number of header2 greater or equal than lower bound(3 by default, controled by `h2lb`)\n\nThe maxdepth of toc is `####` header4 by default. You can also change the default parameter such as:\n```\n{\n  \"plugins\": [\n    \"etoc\"\n  ],\n  \"pluginsConfig\": {\n    \"etoc\": {\n      \"h2lb\": 3,\n      \"mindepth\": 3,\n      \"maxdepth\": 4,\n      \"notoc\": false\n    }\n  }\n}\n```\n\nThe configuration json schema can be found in [gitbook-plugin-etoc/package.json](https://github.com/billryan/gitbook-plugin-etoc/blob/master/package.json)\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillryan%2Fgitbook-plugin-etoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbillryan%2Fgitbook-plugin-etoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillryan%2Fgitbook-plugin-etoc/lists"}