{"id":18455462,"url":"https://github.com/danielhaim1/autotoc","last_synced_at":"2026-02-07T23:04:15.017Z","repository":{"id":218621102,"uuid":"746942879","full_name":"danielhaim1/autotoc","owner":"danielhaim1","description":"NPM package for generating and managing table of contents with scroll highlighting for web content","archived":false,"fork":false,"pushed_at":"2025-09-16T11:22:55.000Z","size":1986,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T13:35:07.772Z","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/danielhaim1.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,"zenodo":null}},"created_at":"2024-01-23T00:17:12.000Z","updated_at":"2025-09-16T11:23:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"877390d5-9727-4c72-aca3-c90362213e62","html_url":"https://github.com/danielhaim1/autotoc","commit_stats":null,"previous_names":["danielhaim1/autotoc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielhaim1/autotoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielhaim1%2Fautotoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielhaim1%2Fautotoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielhaim1%2Fautotoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielhaim1%2Fautotoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielhaim1","download_url":"https://codeload.github.com/danielhaim1/autotoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielhaim1%2Fautotoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29211612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T22:58:45.823Z","status":"ssl_error","status_checked_at":"2026-02-07T22:58:45.272Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-06T08:08:06.883Z","updated_at":"2026-02-07T23:04:15.002Z","avatar_url":"https://github.com/danielhaim1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoTOC API\n\n[![npm version](https://img.shields.io/npm/v/@danielhaim/autotoc)](https://www.npmjs.com/package/@danielhaim/autotoc)\n[![Downloads](https://img.shields.io/npm/dt/@danielhaim/autotoc.svg)](https://www.npmjs.com/package/@danielhaim/autotoc)\n![GitHub](https://img.shields.io/github/license/danielhaim1/autotoc)\n\nOverview\n--------\n\n`AutoTOC` is an NPM package for automatically generating and managing table of contents with scroll highlighting for web content\n\n[CodePen Demo](https://codepen.io/danielhaim/pen/jOJLbrV)\n\n\nAPI Documentation\n--------------------\n\n### Getting Started ###\n\nTo initiate, install `AutoTOC` using NPM:\n\n```shell \nnpm i @danielhaim/autotoc\n```\n\n### Module Example ###\n\n```js\nimport AutoToc from \"@danielhaim/autotoc\";\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n    const tocOptions = {\n        contentSelector: \"article\",\n        navigationContainer: \"nav\",\n        tocTitle: \"Table of Contents\",\n        tocIcon: '\u003ci class=\"your-icon-class\"\u003e\u003c/i\u003e',\n        highlightOffset: 100,\n        headingDepthLimit: 4\n    };\n\n    // Appends to Top\n    const externalLinksTop = [\n        { id: \"external-link1\", text: \"Custom Top Link 1\" },\n        { id: \"external-link2\", text: \"Custom Top Link 2\" }\n    ];\n\n    // Appends to Bottom\n    const externalLinksBottom = [\n        { id: \"external-link3\", text: \"Custom Bottom Link 3\" },\n        { id: \"external-link4\", text: \"Custom Bottom Link 4\" }\n    ];\n\n    try {\n        const tocGenerator = new AutoToc.Generate(\n            ...Object.values(tocOptions)\n        );\n\n        tocGenerator.addExternalLinksToToc(externalLinksTop, \"top\", \"level-0\");\n        tocGenerator.addExternalLinksToToc(externalLinksBottom, \"bottom\", \"level-0\");\n        tocGenerator.initialize();\n    } catch (error) {\n        console.error(\"An error occurred:\", error.message);\n    }\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielhaim1%2Fautotoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielhaim1%2Fautotoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielhaim1%2Fautotoc/lists"}