Modified the doc for --theme flag. Closes #37

This commit is contained in:
Mathieu David 2015-08-11 17:15:54 +02:00
parent 5b487a03fc
commit b6034e8fbe
2 changed files with 9 additions and 3 deletions

View File

@ -36,11 +36,17 @@ by appending a path to the command:
mdbook init path/to/book mdbook init path/to/book
``` ```
#### --theme
When you use the `--theme` argument, the default theme will be copied into a directory
called `theme` in your source directory so that you can modify it.
The theme is selectively overwritten, this means that if you don't want to overwrite a
specific file, just delete it and the default file will be used.
## Not yet implemented ## Not yet implemented
In the future I would like `mdBook init` to be able to: In the future I would like `mdBook init` to be able to:
- Copy the default theme to the `src` directory in a `theme` directory when using a flag like `--theme`.
The user could then tweak the theme to his needs.
- Generate files that are in `SUMMARY.md`. If the user has already created a `SUMMARY.md` file and added some entries but did - Generate files that are in `SUMMARY.md`. If the user has already created a `SUMMARY.md` file and added some entries but did
not create the corresponding files, init command should create the files for him. not create the corresponding files, init command should create the files for him.

View File

@ -13,4 +13,4 @@ Here are the files you can overwrite:
- ***book.css*** is the style used in the output. If you want to change the design of your book, this is probably the file you want to modify. Sometimes in conjunction with `index.hbs` when you want to radically change the layout. - ***book.css*** is the style used in the output. If you want to change the design of your book, this is probably the file you want to modify. Sometimes in conjunction with `index.hbs` when you want to radically change the layout.
- ***book.js*** is mostly used to add client side functionality. - ***book.js*** is mostly used to add client side functionality.
***Note:*** *When you overwrite a file, it is possible that you break some functionality. Therefore I recommend to use the file from the default theme as template and only add / modify what you need. In the future you will be able to copy the default theme into your source directory automatically by using `mdbook init --theme`.* ***Note:*** *When you overwrite a file, it is possible that you break some functionality. Therefore I recommend to use the file from the default theme as template and only add / modify what you need. You can copy the default theme into your source directory automatically by using `mdbook init --theme`.*