See a875763ecc/lib/misc.sh (L28)
The TOC is generated via pandoc and inserted via shell. `<!-- toc -->`
marks the insertion point, the TOC is inserted right below.
I'm using this in utils-go too. We should use it anywhere else we need
TOCs. I'm sure pandoc can handle the frontmatter in d2-docs too.
7 lines
131 B
Bash
Executable file
7 lines
131 B
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
. "$(dirname "$0")/sub/lib.sh"
|
|
cd -- "$(dirname "$0")/.."
|
|
|
|
sh_c tocsubst --skip 1 README.md
|
|
./ci/sub/fmt/make.sh
|