From 6d4585d9952e66c880aa573cd84bed86496969fe Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Tue, 13 Jun 2017 10:27:03 +0200 Subject: [PATCH 1/2] Add docs for the wildcard inclusion feature --- MarkdownSource/docnetjson.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MarkdownSource/docnetjson.md b/MarkdownSource/docnetjson.md index a152c4c..4e8823a 100644 --- a/MarkdownSource/docnetjson.md +++ b/MarkdownSource/docnetjson.md @@ -23,7 +23,8 @@ DocNet uses a json file to determine what to do in what form. The format is stra "__index" : "index.md", "Title Page 3" : "filename_page3.md", "Title Page 4" : "filename_page4.md" - } + }, + "Auto generated" : "reference/**" } } ``` @@ -46,3 +47,14 @@ Each level, starting with the root, has a special page defined, `__index`. This ## Levels without __index defined If a level has no `__index` defined, `DocNet` will create a `__index` entry for the level and will specify as target `/nameoflevel.md`. If the page exists it will be loaded as the content for the index of the level, if it doesn't exist, the HTML will simply contain the topictitle and a list of all the sub topics in the level. This guarantees the tree can always be navigated in full. + +## Use of wildcard inclusions +If a level has a string value ending with `**`, it will automatically generate the files for all the (sub)folders. It will use the following process: + +1. Search (recursively) for all markdown (`.md`) files inside the specified folder (e.g. `reference`) +2. Generate index (htm) files for all folders +3. The title of the markdown files will be retrieved from the actual markdown files (so the first non-empty line will be used as title) + +@alert info +The wildcard inclusion feature is extremely useful for referene or API documentation (mostly generated by a 3rd party tool) +@end \ No newline at end of file From 7896e707c01cb8417f5a3a5a05e7b0bff56c08cc Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Tue, 13 Jun 2017 15:40:23 +0200 Subject: [PATCH 2/2] Update docs based on feedback --- MarkdownSource/docnetjson.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MarkdownSource/docnetjson.md b/MarkdownSource/docnetjson.md index 4e8823a..48335cb 100644 --- a/MarkdownSource/docnetjson.md +++ b/MarkdownSource/docnetjson.md @@ -49,7 +49,7 @@ Each level, starting with the root, has a special page defined, `__index`. This If a level has no `__index` defined, `DocNet` will create a `__index` entry for the level and will specify as target `/nameoflevel.md`. If the page exists it will be loaded as the content for the index of the level, if it doesn't exist, the HTML will simply contain the topictitle and a list of all the sub topics in the level. This guarantees the tree can always be navigated in full. ## Use of wildcard inclusions -If a level has a string value ending with `**`, it will automatically generate the files for all the (sub)folders. It will use the following process: +If a level has a string value ending with `**`, it will process all .md files in the folders and subfolders and generate htm files from them. It will use the following process: 1. Search (recursively) for all markdown (`.md`) files inside the specified folder (e.g. `reference`) 2. Generate index (htm) files for all folders