Merge pull request #82 from steveklabnik/docs

mdbook test documentation
This commit is contained in:
Mathieu David 2015-12-30 00:12:21 +01:00
commit 6c94ba8a88
7 changed files with 18 additions and 8 deletions

View File

@ -5,6 +5,7 @@
- [init](cli/init.md) - [init](cli/init.md)
- [build](cli/build.md) - [build](cli/build.md)
- [watch](cli/watch.md) - [watch](cli/watch.md)
- [test](cli/test.md)
- [Format](format/format.md) - [Format](format/format.md)
- [SUMMARY.md](format/summary.md) - [SUMMARY.md](format/summary.md)
- [Configuration](format/config.md) - [Configuration](format/config.md)

View File

@ -2,7 +2,7 @@
The build command is used to render your book: The build command is used to render your book:
``` ```bash
mdbook build mdbook build
``` ```
@ -17,7 +17,7 @@ convenience. Large books will therefore remain structured when rendered.
Like `init`, the `build` command can take a directory as argument to use instead of the Like `init`, the `build` command can take a directory as argument to use instead of the
current working directory. current working directory.
``` ```bash
mdbook build path/to/book mdbook build path/to/book
``` ```

View File

@ -12,7 +12,7 @@ If you haven't already, you should begin by installing [Rust](https://www.rust-l
Open your terminal and navigate to the directory of you choice. We need to clone the git repository and then build it with Cargo. Open your terminal and navigate to the directory of you choice. We need to clone the git repository and then build it with Cargo.
``` ```bash
git clone --depth=1 https://github.com/azerupi/mdBook.git git clone --depth=1 https://github.com/azerupi/mdBook.git
cd mdBook cd mdBook
cargo build --release cargo build --release

View File

@ -2,7 +2,7 @@
The `init` command is used like this: The `init` command is used like this:
``` ```bash
mdbook init mdbook init
``` ```
@ -11,7 +11,7 @@ spend more time writing your book and less setting it up.
The files set up for you are the following: The files set up for you are the following:
``` ```text
book-test/ book-test/
├── book ├── book
└── src └── src
@ -34,7 +34,7 @@ When a `SUMMARY.md` file already exists, the `init` command will generate the fi
When using the `init` command, you can also specify a directory, instead of using the current working directory, When using the `init` command, you can also specify a directory, instead of using the current working directory,
by appending a path to the command: by appending a path to the command:
``` ```bash
mdbook init path/to/book mdbook init path/to/book
``` ```

View File

@ -0,0 +1,9 @@
# The test command
Its nice to be able to ensure that examples in documentation are current.
mdBook supports a test command, which will use Rustdoc to test out examples:
```bash
$ mdbook test
[*]: Testing file: "/mdBook/book-example/src/README.md”
```

View File

@ -8,6 +8,6 @@ You could issue `mdbook build` everytime you change a file. But using `mdbook wa
Like `init` and `build`, `watch` can take a directory as argument to use instead of the Like `init` and `build`, `watch` can take a directory as argument to use instead of the
current working directory. current working directory.
``` ```bash
mdbook watch path/to/book mdbook watch path/to/book
``` ```

View File

@ -3,7 +3,7 @@
mdBook is not only a command line tool, it can be used as a crate. You can extend it, mdBook is not only a command line tool, it can be used as a crate. You can extend it,
integrate it in current projects. Here is a short example: integrate it in current projects. Here is a short example:
```rust ```rust,ignore
extern crate mdbook; extern crate mdbook;
use mdbook::MDBook; use mdbook::MDBook;