Table of contents generator for Markdown.
97
Automatically insert or update a clickable table of contents (TOC) into your Markdown documents based on its headings with the perfect support for README.md files on GitHub.
md-toc-cli creates table of contents from level 2-6 headings (e.g., ## Heading, ### Heading etc.) and inserts it after level 1 heading or at the beginning of the file.
Zero or one level 1 heading is expected (e.g., # Heading).
HTML anchor elements are added to level 1-6 headings to make table of content items clickable, e.g. <a id="..."></a>.
Anchor at level 1 heading allows creating "Back to top" links as [Back to top](#0).
When running md-toc-cli using Docker, mount the directory containing the Markdown files as a volume.
Insert table of contents to the README.md file in the current directory
docker run --rm -v .:/markdown eugenekhyst/md-toc-cli -i README.md
Read the manual
docker run --rm -v .:/markdown eugenekhyst/md-toc-cli --help
The source code is available on GitHub.
Content type
Image
Digest
sha256:cb8c83413…
Size
51.9 MB
Last updated
almost 3 years ago
docker pull eugenekhyst/md-toc-cli:v3.1.1