Skip to content

mdbook test documentation #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book-example/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [init](cli/init.md)
- [build](cli/build.md)
- [watch](cli/watch.md)
- [test](cli/test.md)
- [Format](format/format.md)
- [SUMMARY.md](format/summary.md)
- [Configuration](format/config.md)
Expand Down
4 changes: 2 additions & 2 deletions book-example/src/cli/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The build command is used to render your book:

```
```bash
mdbook build
```

Expand All @@ -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
current working directory.

```
```bash
mdbook build path/to/book
```

Expand Down
2 changes: 1 addition & 1 deletion book-example/src/cli/cli-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
```bash
git clone --depth=1 https://github.com/azerupi/mdBook.git
cd mdBook
cargo build --release
Expand Down
6 changes: 3 additions & 3 deletions book-example/src/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `init` command is used like this:

```
```bash
mdbook init
```

Expand All @@ -11,7 +11,7 @@ spend more time writing your book and less setting it up.

The files set up for you are the following:

```
```text
book-test/
├── book
└── src
Expand All @@ -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,
by appending a path to the command:

```
```bash
mdbook init path/to/book
```

Expand Down
9 changes: 9 additions & 0 deletions book-example/src/cli/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The test command

It’s 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”
```
2 changes: 1 addition & 1 deletion book-example/src/cli/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
current working directory.

```
```bash
mdbook watch path/to/book
```
2 changes: 1 addition & 1 deletion book-example/src/lib/lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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:

```rust
```rust,ignore
extern crate mdbook;

use mdbook::MDBook;
Expand Down