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
Copy file name to clipboardExpand all lines: src/DocFxTocGenerator/Domain/CommandlineOptions.cs
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ public class CommandlineOptions
35
35
publicboolUseOrder{get;set;}
36
36
37
37
/// <summary>
38
-
/// Gets or sets a value indicating whether the .order files are used.
38
+
/// Gets or sets a value indicating whether the .override files are used.
39
39
/// </summary>
40
40
[Option('r',"override",Required=false,HelpText="Use the .override files for TOC file name override. Format are raws of: filename-without-extension;Title you want")]
41
41
publicboolUseOverride{get;set;}
@@ -58,5 +58,12 @@ public class CommandlineOptions
58
58
/// </summary>
59
59
[Option('n',"notwithone",Required=false,HelpText="Do not auto-generate a file index when only contains 1 file. Additional to -i flag.")]
60
60
publicboolNoAutoIndexWithOneFile{get;set;}
61
+
62
+
/// <summary>
63
+
/// Gets or sets a value indicating whether multiple toc files should be generated for each of the first child subfolders instead of building
64
+
/// one large toc in the root output folder.
65
+
/// </summary>
66
+
[Option('m',"multitoc",Required=false,HelpText="Indicates how deep in the tree toc files should be generated for child subfolders, a depth of 0 is the root only.")]
-d, --docfolder Required. Folder containing the documents.
11
-
-o, --outputfolder Folder to write the resulting toc.yml in.
12
-
-v, --verbose Show verbose messages.
13
-
-s, --sequence Use the .order files for TOC sequence. Format are raws of: filename-without-extension
14
-
-r, --override Use the .override files for TOC file name override. Format are raws of: filename-without-extension;Title you want
15
-
-i, --index Auto-generate a file index in each folder.
16
-
-g, --ignore Use the .ignore files for TOC directory ignore. Format are raws of directory names: directory-to-ignore
17
-
--help Display this help screen.
18
-
--version Display version information.
10
+
-d, --docfolder Required. Folder containing the documents.
11
+
-o, --outputfolder Folder to write the resulting toc.yml in.
12
+
-v, --verbose Show verbose messages.
13
+
-s, --sequence Use the .order files for TOC sequence. Format are raws of: filename-without-extension
14
+
-r, --override Use the .override files for TOC file name override. Format are raws of: filename-without-extension;Title you want
15
+
-i, --index Auto-generate a file index in each folder.
16
+
-g, --ignore Use the .ignore files for TOC directory ignore. Format are raws of directory names: directory-to-ignore
17
+
-m, --multitoc <depth> Generate multiple toc files for child folders down to a certain child depth, default is 0 (root only generation).
18
+
--help Display this help screen.
19
+
--version Display version information.
19
20
```
20
21
21
22
If the `-o or --outputfolder` is not provided, the output folder is set to the docfolder.
@@ -62,3 +63,7 @@ If there are files or directories which are not in the .order file, they will be
62
63
If the `-i or --index` parameter is provided, for every folder that doesn't have a README.md or INDEX.md, an INDEX.md is generated with the contents of that folder. That file is also added to the top of the list of files and directories in that folder.
63
64
64
65
The generated INDEX.md contains of an H1-header with the name of the folder, followed by a list of files and directories using their title and a link to the item.
66
+
67
+
## Generating mutiple child toc files
68
+
69
+
The `-m or --multitoc` option will control how far down the folder tree structure to generating toc files and allows you to generate multiple smaller, more managable TOC files for large DocFX projects. If the parameter is omitted, the default of 0 is assumed, which means only one large TOC at the root level will generated. Any value greater than 0 indicates how deep into the child folder structure TOC files will be generated, with the parent TOC having references to those located in the child folders.
0 commit comments