A GitHub Action that automatically generates and updates table of contents in markdown files using DocToc.
TOC Generator is a GitHub Action that automatically creates and updates table of contents in markdown files. It solves the problem of manually maintaining TOCs in documentation by integrating DocToc into CI/CD pipelines, ensuring TOCs stay current with file changes.
Developers and technical writers who maintain markdown documentation in GitHub repositories and want to automate TOC management.
Developers choose TOC Generator for its seamless GitHub Actions integration, flexible configuration options, and ability to handle TOC updates via direct commits or pull requests, reducing manual documentation tasks.
GitHub Actions to generate TOC (Table of Contents)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Executes DocToc on events like push or pull requests, automatically generating or updating TOCs without manual intervention, as shown in the screenshot and workflow examples.
Supports custom titles, max header levels, foldable sections, and custom templates via options like CUSTOM_MODE and CUSTOM_TEMPLATE, allowing tailored TOC appearance.
Offers direct commits or pull request creation with context variables for dynamic messages, and works on multiple trigger events including schedules and manual dispatches.
Limits execution to specific branch prefixes or pull requests with certain labels using TARGET_BRANCH_PREFIX and INCLUDE_LABELS, providing granular control.
The default GITHUB_TOKEN doesn't trigger subsequent actions, requiring manual setup of a personal access token for full CI/CD chaining, which adds complexity.
With over 20 options and the need to specify parameters individually in comments, setup can be verbose and error-prone, especially for newcomers to GitHub Actions.
Inherits all limitations from DocToc, such as potential mishandling of complex markdown syntax or non-standard headers, which may necessitate manual fixes.