{"id":15634940,"url":"https://github.com/bubkoo/hexo-toc","last_synced_at":"2025-04-09T10:09:13.946Z","repository":{"id":30648625,"uuid":"34204225","full_name":"bubkoo/hexo-toc","owner":"bubkoo","description":"📖  Insert a markdown TOC before posts be rendered.","archived":false,"fork":false,"pushed_at":"2023-03-21T04:05:30.000Z","size":27,"stargazers_count":127,"open_issues_count":9,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T08:08:05.217Z","etag":null,"topics":["hexo","hexo-filter","toc"],"latest_commit_sha":null,"homepage":"","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/bubkoo.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":"2015-04-19T11:35:48.000Z","updated_at":"2024-11-05T18:50:10.000Z","dependencies_parsed_at":"2024-06-18T18:39:55.878Z","dependency_job_id":"2ae6dc9f-9aab-46d5-a6c7-d0eafab3cfce","html_url":"https://github.com/bubkoo/hexo-toc","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/bubkoo%2Fhexo-toc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubkoo%2Fhexo-toc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubkoo%2Fhexo-toc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubkoo%2Fhexo-toc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bubkoo","download_url":"https://codeload.github.com/bubkoo/hexo-toc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018061,"owners_count":21034048,"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":["hexo","hexo-filter","toc"],"created_at":"2024-10-03T10:59:37.966Z","updated_at":"2025-04-09T10:09:13.908Z","avatar_url":"https://github.com/bubkoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexo-toc\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/hexo-toc/blob/master/LICENSE)\n\n[![npm:](https://img.shields.io/npm/v/hexo-toc.svg?style=flat-square)](https://www.npmjs.com/packages/hexo-toc)\n[![Package Quality](http://npm.packagequality.com/shield/hexo-toc.svg)](http://packagequality.com/#?package=hexo-toc)\n\n\u003e Insert a markdown TOC(Table Of Content) before posts be rendered.\n\nUnlike the native [`toc`](http://hexo.io/docs/helpers.html#toc) helper, this plugin will inject a TOC only when a placeholder(`\u003c!-- toc --\u003e`) found in the raw markdown files. And the TOC will be injected after the placeholder.\n\nAll you need to do is placing a placeholder(`\u003c!-- toc --\u003e`) in your post when and where needed.\n\n**Note:** this plugin will not mangle your posts(markdown files), so you can use it bold.\n\n\n## Install\n\n```node\nnpm install hexo-toc --save\n```\n\n## Options\n\nAll the options of [markdown-toc](https://github.com/jonschlinkert/markdown-toc),\nslugify function, and heading anchor options can be specified as follow in your `_config.yml`:\n\n```yaml\ntoc:\n  maxdepth: 3\n  class: toc\n  slugify: transliteration\n  decodeEntities: false\n  anchor:\n    position: after\n    symbol: '#'\n    style: header-anchor\n```\n\n- `maxdepth`: Use headings whose depth is at most maxdepth.\n- `class`: The CSS Class for the toc. (*Default is `false`*)\n- `slugify`: Choose which slugify function you want to use. Currently support [uslug](https://github.com/jeremys/uslug) (*Default*) and [transliteration](https://github.com/andyhu/node-transliteration).\n- `decodeEntities`: Select whether to enable decode entities. ( *Default is `false`* and please see [#15](https://github.com/bubkoo/hexo-toc/pull/15)).\n- `anchor`: Whether should have an anchor for each headings. (*Default is `false`*)\n    - `position`: Where should the anchor be, `before` the title, or `after` the title. (*Default is `after`*);\n    - `symbol`: Which symbol you want the anchor be. (*Default is `#`*);\n    - `style`: The CSS class for the anchor, (*Default is `header-anchor`*);\n\n## Known issues\n\n### [#8](https://github.com/bubkoo/hexo-toc/issues/8)\n\nWorking with [hexo-renderer-markdown-it](https://github.com/celsomiranda/hexo-renderer-markdown-it).\n\n```yaml\n# Markdown-it config\n## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki\nmarkdown:\n  render:\n    html: true\n```\n\n## Related\n   \n- [hexo-filter-fenced-code](https://github.com/bubkoo/hexo-filter-fenced-code) Extend syntax for the native fenced code block.\n- [hexo-filter-flowchart](https://github.com/bubkoo/hexo-filter-flowchart) Generate flowchart diagrams for Hexo.\n- [hexo-filter-sequence](https://github.com/bubkoo/hexo-filter-sequence) Generate UML sequence diagrams for Hexo.\n- [hexo-filter-sub](https://github.com/bubkoo/hexo-filter-sub) Generate subscript (`\u003csub\u003e`) tag for Hexo.\n- [hexo-filter-sup](https://github.com/bubkoo/hexo-filter-sup) Generate superscript (`\u003csup\u003e`) tag for Hexo.\n- [hexo-theme-formula](https://github.com/bubkoo/hexo-theme-formula) Hexo theme base on jade and less. \n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/bubkoo/hexo-toc/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubkoo%2Fhexo-toc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbubkoo%2Fhexo-toc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubkoo%2Fhexo-toc/lists"}