Commit 5789a2f
committed
Add pre-commit hook
thlorenz/doctoc@59dcae9
Adds some more automation to auto create the table of contents.
https://github.com/thlorenz/doctoc
https://github.com/thlorenz/doctoc#usage-as-a-git-hook
Used on Apache Airflow:
https://github.com/apache/airflow/blob/be44ad1ac6c3b368187b73542ae06e1339ffa8fc/.pre-commit-config.yaml#L33
Also used on Apache CloudStack:
https://github.com/apache/cloudstack/blob/5ad7daf6100bed5fd8d90c4e186447d549a3cd68/.pre-commit-config.yaml#L28
We can change the placement of the TOC or add some text before if needed.
There are options for further formatting including only showing certain heading levels:
https://github.com/thlorenz/doctoc#source-optionsdoctoc to auto generate README table of contents1 parent 0a16c76 commit 5789a2f
2 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
7 | 51 | | |
8 | 52 | | |
9 | 53 | | |
| |||
0 commit comments