{"id":18427235,"url":"https://github.com/fjebaker/mdtoc","last_synced_at":"2025-04-13T19:39:02.520Z","repository":{"id":51697171,"uuid":"250964239","full_name":"fjebaker/mdtoc","owner":"fjebaker","description":"Table of contents generator for markdown documents.","archived":false,"fork":false,"pushed_at":"2021-05-10T17:39:51.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T01:06:58.583Z","etag":null,"topics":["markdown","md","mdtoc","toc","toc-generator"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fjebaker.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}},"created_at":"2020-03-29T05:55:48.000Z","updated_at":"2021-05-10T17:39:51.000Z","dependencies_parsed_at":"2022-08-23T01:11:14.245Z","dependency_job_id":null,"html_url":"https://github.com/fjebaker/mdtoc","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/fjebaker%2Fmdtoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fmdtoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fmdtoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fmdtoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjebaker","download_url":"https://codeload.github.com/fjebaker/mdtoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248769642,"owners_count":21158846,"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":["markdown","md","mdtoc","toc","toc-generator"],"created_at":"2024-11-06T05:10:00.558Z","updated_at":"2025-04-13T19:39:02.482Z","avatar_url":"https://github.com/fjebaker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdtoc\n\nA simple table of contents generator for markdown documents. \n\nTo setup, clone the repository and run\n```\ncd mdtoc \u0026\u0026 npm install\n```\n\nIf you want to be able to use the tool in any directory for OSX or Linux, also run\n```\necho \"export PATH=$(pwd):$PATH\" \u003e\u003e ~/.profile\n```\n\n### Usage\nIn a terminal\n```\nmdtoc {file|dir} [{file|dir}, ...] [-d/--header N]\n```\nThe `-d` option sets the count of # for the top level header. For example, if you formatted a document with\n```\n# Title\n\n### Some preliminary information\nLorem Ipsum dolor sit amet.\n\n## First heading\n...\n```\nYou can omit headings prior to the `## First Heading` by setting the header flag `-d 2` (which is also the default value).\n\nThe program will crawl directories for `.md` files and generate a table of contents in the format\n\n1. [Heading]()\n2. [Heading]()\n\t1. [Subheading]()\n\t\t1. [Sub-subheading]()\n\t2. [Subheading]()\n3. [Heading]()\n\n### Features\n- Creates hyperlinked index references using `\u003ca name=\"\"\u003e` tags.\n- Nests headings, subheadings, and sub-subheadings in coherent format.\n- Places generated table of contents at top of document, tagged with \n```\n\u003c!--BEGIN TOC--\u003e\n...\n\u003c!--END TOC--\u003e\n```\nIf the tags are moved and the program executed again, `mdtoc` will replace the existing table of contents, instead of reinserting at the top of the document.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fmdtoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjebaker%2Fmdtoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fmdtoc/lists"}