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
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New customers can spin up VMs, build with AI, and query data at no cost.

Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
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

2026-09-23