Installation • Usage • Build Status • Contributing • License
mdtoc
is simple utility for generating table of contents for markdown files.
To build the MDToc from scratch, make sure you have a working Go 1.18+ workspace (instructions), then:
go install github.com/essentialkaos/mdtoc
You can download prebuilt binaries for Linux and macOS from EK Apps Repository:
bash <(curl -fsSL https://apps.kaos.st/get) mdtoc
Usage: mdtoc {options} file
Options
--flat, -f Print flat (horizontal) ToC
--html, -H Render HTML ToC instead Markdown (works with --flat)
--min-level, -m 1-6 Minimal header level
--max-level, -M 1-6 Maximum header level
--no-color, -nc Disable colors in output
--help, -h Show this help message
--version, -v Show version
Examples
mdtoc readme.md
Generate table of contents for readme.md
mdtoc -m 2 -M 4 readme.md
Generate table of contents for readme.md with 2-4 level headers
Branch | Status |
---|---|
master |
|
develop |
Before contributing to this project please read our Contributing Guidelines.