Skip to content

Commit e9f8d3d

Browse files
committed
added command line options and explanation about how the article name is derived
1 parent 16e2585 commit e9f8d3d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,33 @@ or, For example:
5656
$ book sm -r ../sailsjs-docs-gitbook/en -i 0home -u 'myApp' -c 'concepts, reference, userguides' -n "Sails.js 官方文档(中英合辑)"
5757
```
5858

59-
**Note**`-s` or `--sortedBy` can not be given `-`, commander.js will parse it an option. But you can set it in `book.json` as follow.
59+
To see the command line options:
60+
61+
```
62+
$ book sm --help
63+
64+
Usage: summary|sm [options]
65+
66+
Generate a `SUMMARY.md` from a folder
67+
68+
Options:
69+
70+
-h, --help output usage information
71+
-r, --root [string] root folder, default is `.`
72+
-n, --bookname [string] book name, default is `Your Book Name`.
73+
-c, --catalog [list] catalog folders included book files, default is `all`.
74+
-i, --ignores [list] ignore folders that be excluded, default is `[]`.
75+
-u, --unchanged [list] unchanged catalog like `request.js`, default is `[]`.
76+
-o, --outputfile [string] output file, defaut is `./SUMMARY.md`
77+
-s, --sortedBy [string] sorted by sortedBy, for example: `num-`, defaut is sorted by characters
78+
-d, --disableTitleFormatting don't convert filename/folder name to start case (for example: `JavaScript` to `Java Script`), default is `false`
79+
80+
```
81+
82+
**Notes**
83+
* The article title is taken from `title` property in the articles front-matter. If this property is not available, the articles filename will be used as title for the summary.
84+
* The option `-s` or `--sortedBy` can not be given `-` as argument, because commander.js will parse it an option. But you can set it in `book.json` as follows.
85+
6086

6187
2> Create a `book.json` in the book`s root folder
6288

0 commit comments

Comments
 (0)