{"id":23070231,"url":"https://github.com/markbattistella/docsify-auto-headers","last_synced_at":"2025-07-05T09:06:19.032Z","repository":{"id":53734668,"uuid":"287526756","full_name":"markbattistella/docsify-auto-headers","owner":"markbattistella","description":"An auto heading numbering plugin for docsify.js","archived":false,"fork":false,"pushed_at":"2024-07-10T04:00:15.000Z","size":446,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T13:56:56.935Z","etag":null,"topics":["docsify","docsify-js","docsify-plugin","documentation","documentation-tool","hacktoberfest","headers"],"latest_commit_sha":null,"homepage":"https://header.docsify.markbattistella.com/","language":null,"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/markbattistella.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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},"funding":{"custom":["https://www.paypal.me/markbattistella/5AUD","https://www.paypal.me/markbattistella/10AUD","https://www.paypal.me/markbattistella/20AUD"]}},"created_at":"2020-08-14T12:22:59.000Z","updated_at":"2025-05-26T22:47:43.000Z","dependencies_parsed_at":"2024-07-10T06:22:43.164Z","dependency_job_id":"d4885190-1eca-4e1c-a6c2-a47c03fd1de9","html_url":"https://github.com/markbattistella/docsify-auto-headers","commit_stats":{"total_commits":77,"total_committers":2,"mean_commits":38.5,"dds":0.2727272727272727,"last_synced_commit":"36ca0a11642afe522659f55b5ffcb4a65a120f3b"},"previous_names":["markbattistella/docsify-autoheaders"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/markbattistella/docsify-auto-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2Fdocsify-auto-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2Fdocsify-auto-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2Fdocsify-auto-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2Fdocsify-auto-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbattistella","download_url":"https://codeload.github.com/markbattistella/docsify-auto-headers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2Fdocsify-auto-headers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263715328,"owners_count":23500242,"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":["docsify","docsify-js","docsify-plugin","documentation","documentation-tool","hacktoberfest","headers"],"created_at":"2024-12-16T06:25:22.726Z","updated_at":"2025-07-05T09:06:19.010Z","avatar_url":"https://github.com/markbattistella.png","language":null,"readme":"\u003cdiv align=\"center\"\u003e\n\n# docsify.js auto-headers\n\n\u003c/div\u003e\n\nThis plugin enhances your Docsify documentation by automatically generating numbered headers for your markdown files. It allows you to configure the header levels, numbering format, and inclusion in the sidebar. By utilising this plugin, you can easily manage and navigate through your documentation headers, ensuring consistency and improved readability.\n\n## Demo pages\n\n| Page link | Description |\n|-|-|\n| [![](https://img.shields.io/badge/page_1--blue?style=for-the-badge)](pages/_page1) | The `autoHeader` of this page is: `@autoHeader:1`.\u003cbr\u003eAssuming the original configuration is used, the splitter is `.` and the levels are `H1`-`H6`. |\n| [![](https://img.shields.io/badge/page_2--blue?style=for-the-badge)](pages/_page2) | The `autoHeader` of this page is: `\u003c!-- autoHeader:11.22.33.44.55.66 --\u003e`.\u003cbr\u003eAssuming the original configuration is used, the splitter is `.` and the levels are `H1`-`H6`. |\n| [![](https://img.shields.io/badge/page_3--blue?style=for-the-badge)](pages/_page3) | The `autoHeader` of this page is: `@autoHeader:`.\u003cbr\u003eAssuming the original configuration is used, the splitter is `.` and the levels are `H1`-`H6`. |\n| [![](https://img.shields.io/badge/page_4--blue?style=for-the-badge)](pages/_page4) | The `autoHeader` of this page is: `\u003c!-- autoHeader:Z.Y --\u003e`.\u003cbr\u003eAssuming the original configuration is used, the splitter is `.` and the levels are `H1`-`H6`. |\n| [![](https://img.shields.io/badge/page_5--blue?style=for-the-badge)](pages/_page5) | The `autoHeader` of this page is: `\u003c!-- autoHeader:1-2-3 --\u003e`.\u003cbr\u003eAssuming the original configuration is used, the splitter is `.` and the levels are `H1`-`H6`. |\n\n## Installation\n\n!\u003e Note: There are breaking changes in the configuration from `v4.x` to `v5.x`. Please take the time to read all the documentation before upgrading\n\n### Update `index.html` file\n\nAssuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin.\n\n1. Add one of the following script tags to your `index.html` via either CDN or downloading it and using it locally:\n\n    ```html\n    \u003c!-- unpkg.com --\u003e\n    \u003cscript src=\"https://unpkg.com/@markbattistella/docsify-autoheaders@latest\"\u003e\u003c/script\u003e\n\n    \u003c!-- jsDelivr --\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/@markbattistella/docsify-autoheaders@latest\"\u003e\u003c/script\u003e\n\n    \u003c!-- locally --\u003e\n    \u003cscript src=\"docsify-autoheaders.min.js\"\u003e\u003c/script\u003e\n    ```\n\n1. In docsify setup, configure the plugin:\n\n    ```js\n    \u003cscript\u003e\n    window.$docsify = {\n      autoHeaders: {\n\n        // Separator for header numbering (e.g., '.', '-', ')')\n        separator: '.',\n\n        // Boolean indicating if headers should be added to the sidebar\n        sidebar: false,\n\n        // Number of header levels to include (1 to 6) or an object with start and finish properties\n        levels: 6,\n        // levels: { start: 1, finish: 6 }\n\n        // Boolean to enable or disable debug messages\n        debug: false\n      }\n   };\n   \u003c/script\u003e\n   ```\n\n## Configuration\n\nThere are several options available for the docsify-auto-headers plugin:\n\n| Setting     | Type    | Options                             |\n|-------------|---------|-------------------------------------|\n| `separator` | String  | e.g., `.`, `-`, `)`                 |\n| `sidebar`   | Boolean | `true` or `false`                   |\n| `levels`    | Number  | `1` to `6`                          |\n|             | Object  | `{ start: Number, finish: Number }` |\n| `debug`     | Boolean | `true` or `false`                   |\n\n## Usage\n\nThe plugin can be configured to apply scoped heading counts in either the sidebar or the main content, depending on your setup.\n\n### Adding the signifier\n\nWhen you want to use the heading numbering on a markdown file you can add either of the following signifiers to the **first line** of the document:\n\n```md\n@autoHeader:\n```\n\n```md\n\u003c!-- autoHeader: --\u003e\n```\n\nAfter the colon (`:`) you can add in the number that will begin for heading level 1 (`H1`).\n\n### Sidebar\n\nIf the `sidebar` option is enabled, the headers will be included in the sidebar and processed before rendering the markdown.\n\n### Main Content\n\nIf the `sidebar` option is disabled, the headers will be processed and applied directly to the HTML after rendering.\n\n## Contributing\n\n1. Clone the repo:\u003cbr\u003e`git clone https://github.com/markbattistella/docsify-auto-headers.git`\n\n1. Create your feature branch:\u003cbr\u003e`git checkout -b my-feature`\n\n1. Commit your changes:\u003cbr\u003e`git commit -am 'Add some feature'`\n\n1. `Push` to the branch:\u003cbr\u003e`git push origin my-new-feature`\n\n1. Submit the `pull` request\n","funding_links":["https://www.paypal.me/markbattistella/5AUD","https://www.paypal.me/markbattistella/10AUD","https://www.paypal.me/markbattistella/20AUD"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbattistella%2Fdocsify-auto-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbattistella%2Fdocsify-auto-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbattistella%2Fdocsify-auto-headers/lists"}