Merge pull request #308 from nhooyr/tocsubst-39f7

Add markdown TOC generation using pandoc and shell
This commit is contained in:
Anmol Sethi 2022-12-01 09:55:49 -08:00 committed by GitHub
commit 349d902ffc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 23 deletions

View file

@ -5,7 +5,7 @@ all: fmt gen lint build test
.PHONY: fmt
fmt:
prefix "$@" ./ci/sub/fmt/make.sh
prefix "$@" ./ci/fmt.sh
.PHONY: gen
gen:
prefix "$@" ./ci/gen.sh

View file

@ -19,27 +19,24 @@
# Table of Contents
<!-- toc -->
- [What does D2 look like?](#what-does-d2-look-like)
- [Quickstart](#quickstart)
- [Install](#install)
- [D2 as a library](#d2-as-a-library)
- [Themes](#themes)
- [Fonts](#fonts)
- [Export file types](#export-file-types)
- [Language tooling](#language-tooling)
- [Plugins](#plugins)
- [Comparison](#comparison)
- [Contributing](#contributing)
- [License](#license)
- [Related](#related)
* [VSCode extension](#vscode-extension)
* [Vim extension](#vim-extension)
* [Language docs](#language-docs)
* [Misc](#misc)
- [FAQ](#faq)
<!-- tocstop -->
- <a href="#what-does-d2-look-like" id="toc-what-does-d2-look-like">What does D2 look like?</a>
- <a href="#quickstart" id="toc-quickstart">Quickstart</a>
- <a href="#install" id="toc-install">Install</a>
- <a href="#d2-as-a-library" id="toc-d2-as-a-library">D2 as a library</a>
- <a href="#themes" id="toc-themes">Themes</a>
- <a href="#fonts" id="toc-fonts">Fonts</a>
- <a href="#export-file-types" id="toc-export-file-types">Export file types</a>
- <a href="#language-tooling" id="toc-language-tooling">Language tooling</a>
- <a href="#plugins" id="toc-plugins">Plugins</a>
- <a href="#comparison" id="toc-comparison">Comparison</a>
- <a href="#contributing" id="toc-contributing">Contributing</a>
- <a href="#license" id="toc-license">License</a>
- <a href="#related" id="toc-related">Related</a>
- <a href="#vscode-extension" id="toc-vscode-extension">VSCode extension</a>
- <a href="#vim-extension" id="toc-vim-extension">Vim extension</a>
- <a href="#language-docs" id="toc-language-docs">Language docs</a>
- <a href="#misc" id="toc-misc">Misc</a>
- <a href="#faq" id="toc-faq">FAQ</a>
## What does D2 look like?

9
ci/fmt.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
set -eu
. "$(dirname "$0")/sub/lib.sh"
cd -- "$(dirname "$0")/.."
if is_changed README.md; then
sh_c tocsubst --skip 1 README.md
fi
./ci/sub/fmt/make.sh

2
ci/sub

@ -1 +1 @@
Subproject commit a39a678570a0454d6bf63f9012fb5ec107e24df5
Subproject commit e894a489abaead7314a3f126cdb32f18b272a23f