DocToc is a command-line utility that automatically generates and maintains tables of contents inside Markdown documents. It supports Markdown, Markdown Extended, and MDX files and can recursively process complete directory trees. Generated links can match anchor conventions used by GitHub, GitLab, Bitbucket, Node.js, and Ghost. Users can limit heading levels, exclude specific headings, control list formats, and choose where the generated table appears. Dry-run and update-only modes make it useful in continuous integration and staged commit workflows. Existing generated sections can be refreshed without manually editing their contents. DocToc can also run as a pre-commit hook to keep documentation navigation synchronized automatically.

Features

  • Automatic Markdown table of contents generation
  • Recursive directory processing
  • GitHub, GitLab, Bitbucket, Node.js, and Ghost anchors
  • Heading depth and exclusion controls
  • Dry-run and update-only modes
  • Pre-commit hook integration

Project Samples

Project Activity

See All Activity >

Categories

Markdown Editors

License

MIT License

Follow DocToc

DocToc Web Site

Other Useful Business Software
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DocToc!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Markdown Editors

Registered

19 hours ago