gitbook-summary-generator
v1.0.1
Published
auto generate gitbook summary
Downloads
8
Readme
gitbook-summary-generator
a tool help to generate gitbook summary automatically width one npm script
Getting started
$ npm i gitbook-summary-generator
## generate summary.md
$ gitbooks gen
Configuration
supoprt book.json configuration, e.g.
{
"gitbooksConfig": {
"src": "",
"ignore": "",
"script": ""
}
}
src
indicate the book entry, process.cwd
will be used as default if src is not defined.
ignore
file that matches ignore conditions will not be generated in SUMMARY.md file
{
"gitbooksConfig": {
"ignore": "foo.md"
}
}
It can also take a list of files to ignore.
{
"gitbooksConfig": {
"ignore": ["foo.md", "*foo.md", "private"]
}
}
ignore files names foo.md or ends with foo.md or files that in private dir
script
you can file a node module that export a function as default to accept a rendered summary string to handle before which written into the SUMMARY.md.
{
"gitbooksConfig": {
"script": "./summaryScript.js"
}
}