Introduction
June 21, 2026 ยท View on GitHub
markdown-toc-go is a simple cross-platform program to generate table of
contents for markdown files and expand glossary placeholders for
consistent documentation. I use it to generate TOC for README.md for my
projects in github. I know github shows TOC of README.md but you
have to click on the list icon to show. I want to see TOC at the top of my
README.
It's also a lot of typing to add link and image tags while creating README. md files. The glossary feature can cut down a lot of repetitive and painful typing by allowing you to define reusable content once and reference it throughout your documentation. A single global glossary file can be shared across multiple projects for consistent branding, URLs, and common references.
@ASCIIDOC@ has similar feature but it comes with the whole toolchain baggage -
I do use @ASCIIDOC@ documents. markdown-toc-go is just one
static binary and you're done.
Hope you find this program useful.