Skip to content

simonz19/gitbook-summary-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
  }
}

About

auto generate gitbook summary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published