This script generates the SUMMARY.md assuming the following folder structure. Paths ending with /
denotes directories. **
denotes multiply layers or directories.
./
- gitbook root./*/
- parts, will be generated as# Name of the directory
./**/*.md
- articles./*/**/
- chapters
Note that two operations are done to obtain the names:
- replace hyphens(-) and underscores(_) to spaces( ).
- First character is upper-cased and the rest are lower-cased.
The default readme name is defined by DEFAULT_README_TITLE
.
.
|____programming-languages/ - Part
| |____javascript/ - Chapter
| | |____syntax.md - Article
| | |____README.md - Article
|____projects/ - Part
| |____README.md - Article
|____concepts/ - Part
| |____README.md - Article
|____README.md - Article
Running node generateSummary.js
will generate SUMMARY.md
:
# Summary
* [Introduction](README.md)
## Concepts
* [Introduction](concepts/README.md)
## Programming languages
* [Javascript](programming-languages/javascript/README.md)
* [Syntax](programming-languages/javascript/syntax.md)
## Projects
* [Introduction](README.md)