You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -16,8 +21,6 @@ by github or other sites via a command line flag.
16
21
-[Using doctoc to generate links compatible with other sites](#using-doctoc-to-generate-links-compatible-with-other-sites)
17
22
-[Example](#example)
18
23
-[Specifying location of toc](#specifying-location-of-toc)
19
-
-[Specifying a custom TOC title](#specifying-a-custom-toc-title)
20
-
-[Specifying a maximum heading level for TOC entries](#specifying-a-maximum-heading-level-for-toc-entries)
21
24
-[Printing to stdout](#printing-to-stdout)
22
25
-[Usage as a `git` hook](#usage-as-a-git-hook)
23
26
-[Docker image](#docker-image)
@@ -29,6 +32,41 @@ by github or other sites via a command line flag.
29
32
30
33
npm install -g doctoc
31
34
35
+
## Table of content config options
36
+
37
+
### Setting the Title
38
+
39
+
Use the `--title` option to specify a (Markdown-formatted) custom TOC title; e.g., `doctoc --title '**Contents**' .` From then on, you can simply run `doctoc <file>` and doctoc will keep the title you specified.
40
+
41
+
Alternatively, to blank out the title, use the `--notitle` option. This will simply remove the title from the TOC.
42
+
43
+
### Min. heading level
44
+
45
+
Use the `--minlevel` option to limit TOC entries to headings only at or above the specified level; e.g., `doctoc --minlevel 2 .`
46
+
47
+
By default,
48
+
49
+
- the min level used is 1 if it is not set
50
+
51
+
Note: Currently supported values are only 1 and 2.
52
+
53
+
### Max. heading level
54
+
55
+
Use the `--maxlevel` option to limit TOC entries to headings only up to the specified level; e.g., `doctoc --maxlevel 3 .`
56
+
57
+
By default,
58
+
59
+
- no limit is placed on Markdown-formatted headings,
60
+
- whereas headings from embedded HTML are limited to 4 levels.
61
+
62
+
### Include all Headings
63
+
64
+
Use the `--all` option to include all headings in the TOC regardless of their location
65
+
66
+
By default,
67
+
68
+
- Only headings below the TOC will be included
69
+
32
70
## Usage
33
71
34
72
In its simplest usage, you can pass one or more files or folders to the
@@ -112,31 +150,6 @@ Here we'll discuss...
112
150
113
151
Running doctoc will insert the toc at that location.
114
152
115
-
### Specifying a custom TOC title
116
-
117
-
Use the `--title` option to specify a (Markdown-formatted) custom TOC title; e.g., `doctoc --title '**Contents**' .` From then on, you can simply run `doctoc <file>` and doctoc will keep the title you specified.
118
-
119
-
Alternatively, to blank out the title, use the `--notitle` option. This will simply remove the title from the TOC.
120
-
121
-
### Specifying a minimum heading level for TOC entries
122
-
123
-
Use the `--minlevel` option to limit TOC entries to headings only at or above the specified level; e.g., `doctoc --minlevel 2 .`
124
-
125
-
By default,
126
-
127
-
- the min level used is 1 if it is not set
128
-
129
-
Note: Currently supported values are only 1 and 2.
130
-
131
-
### Specifying a maximum heading level for TOC entries
132
-
133
-
Use the `--maxlevel` option to limit TOC entries to headings only up to the specified level; e.g., `doctoc --maxlevel 3 .`
134
-
135
-
By default,
136
-
137
-
- no limit is placed on Markdown-formatted headings,
138
-
- whereas headings from embedded HTML are limited to 4 levels.
139
-
140
153
### Printing to stdout
141
154
142
155
You can print to stdout by using the `-s` or `--stdout` option.
0 commit comments