From b6034e8fbe37e765cd6a650c3e852565a36f422e Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Tue, 11 Aug 2015 17:15:54 +0200 Subject: [PATCH] Modified the doc for --theme flag. Closes #37 --- book-example/src/cli/init.md | 10 ++++++++-- book-example/src/format/theme/theme.md | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/book-example/src/cli/init.md b/book-example/src/cli/init.md index ee9d0f67..6efa77d7 100644 --- a/book-example/src/cli/init.md +++ b/book-example/src/cli/init.md @@ -36,11 +36,17 @@ by appending a path to the command: 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 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 not create the corresponding files, init command should create the files for him. diff --git a/book-example/src/format/theme/theme.md b/book-example/src/format/theme/theme.md index 847f17e5..2ff036a6 100644 --- a/book-example/src/format/theme/theme.md +++ b/book-example/src/format/theme/theme.md @@ -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.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`.*