Merge pull request #782 from mattico/document-dest-dir-rel

Document dest-dir relative path behavior
This commit is contained in:
Matt Ickstadt 2018-10-23 12:16:37 -05:00 committed by GitHub
commit 33add4b532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 21 deletions

View File

@ -29,8 +29,9 @@ your default web browser after building it.
#### --dest-dir #### --dest-dir
The `--dest-dir` (`-d`) option allows you to change the output directory for the The `--dest-dir` (`-d`) option allows you to change the output directory for the
book. If not specified it will default to the value of the `build.build-dir` key book. Relative paths are interpreted relative to the book's root directory. If
in `book.toml`, or to `./book` relative to the book's root directory. not specified it will default to the value of the `build.build-dir` key in
`book.toml`, or to `./book`.
------------------- -------------------

View File

@ -19,9 +19,9 @@ mdbook clean path/to/book
#### --dest-dir #### --dest-dir
The `--dest-dir` (`-d`) option allows you to override the book's output The `--dest-dir` (`-d`) option allows you to override the book's output
directory, which will be deleted by this command. If not specified it will directory, which will be deleted by this command. Relative paths are interpreted
default to the value of the `build.build-dir` key in `book.toml`, or to `./book` relative to the book's root directory. If not specified it will default to the
relative to the book's root directory. value of the `build.build-dir` key in `book.toml`, or to `./book`.
```bash ```bash
mdbook clean --dest-dir=path/to/book mdbook clean --dest-dir=path/to/book

View File

@ -5,6 +5,9 @@ The serve command is used to preview a book by serving it over HTTP at
changes, rebuilding the book and refreshing clients for each change. A websocket changes, rebuilding the book and refreshing clients for each change. A websocket
connection is used to trigger the client-side refresh. connection is used to trigger the client-side refresh.
***Note:*** *The `serve` command is for testing a book's HTML output, and is not
intended to be a complete HTTP server for a website.*
#### Specify a directory #### Specify a directory
The `serve` command can take a directory as an argument to use as the book's The `serve` command can take a directory as an argument to use as the book's
@ -40,10 +43,6 @@ default web browser after starting the server.
#### --dest-dir #### --dest-dir
The `--dest-dir` (`-d`) option allows you to change the output directory for the The `--dest-dir` (`-d`) option allows you to change the output directory for the
book. If not specified it will default to the value of the `build.build-dir` key book. Relative paths are interpreted relative to the book's root directory. If
in `book.toml`, or to `./book` relative to the book's root directory. not specified it will default to the value of the `build.build-dir` key in
`book.toml`, or to `./book`.
-----
***Note:*** *The `serve` command is for testing, and is not intended to be a
complete HTTP server for a website.*

View File

@ -48,5 +48,6 @@ comma-delimited list (`-L foo,bar`).
#### --dest-dir #### --dest-dir
The `--dest-dir` (`-d`) option allows you to change the output directory for the The `--dest-dir` (`-d`) option allows you to change the output directory for the
book. If not specified it will default to the value of the `build.build-dir` key book. Relative paths are interpreted relative to the book's root directory. If
in `book.toml`, or to `./book` relative to the book's root directory. not specified it will default to the value of the `build.build-dir` key in
`book.toml`, or to `./book`.

View File

@ -22,5 +22,6 @@ your default web browser.
#### --dest-dir #### --dest-dir
The `--dest-dir` (`-d`) option allows you to change the output directory for the The `--dest-dir` (`-d`) option allows you to change the output directory for the
book. If not specified it will default to the value of the `build.build-dir` key book. Relative paths are interpreted relative to the book's root directory. If
in `book.toml`, or to `./book` relative to the book's root directory. not specified it will default to the value of the `build.build-dir` key in
`book.toml`, or to `./book`.

View File

@ -9,7 +9,8 @@ pub fn make_subcommand<'a, 'b>() -> App<'a, 'b> {
.about("Builds a book from its markdown files") .about("Builds a book from its markdown files")
.arg_from_usage( .arg_from_usage(
"-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\ "-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\
(If omitted, uses build.build-dir from book.toml or defaults to ./book)'", Relative paths are interpreted relative to the book's root directory.{n}\
If omitted, mdBook uses build.build-dir from book.toml or defaults to `./book`.'",
).arg_from_usage( ).arg_from_usage(
"[dir] 'Root directory for the book{n}\ "[dir] 'Root directory for the book{n}\
(Defaults to the Current Directory when omitted)'", (Defaults to the Current Directory when omitted)'",

View File

@ -10,7 +10,9 @@ pub fn make_subcommand<'a, 'b>() -> App<'a, 'b> {
.about("Deletes a built book") .about("Deletes a built book")
.arg_from_usage( .arg_from_usage(
"-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\ "-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\
(If omitted, uses build.build-dir from book.toml or defaults to ./book)'", Relative paths are interpreted relative to the book's root directory.{n}\
Running this command deletes this directory.{n}\
If omitted, mdBook uses build.build-dir from book.toml or defaults to `./book`.'",
).arg_from_usage( ).arg_from_usage(
"[dir] 'Root directory for the book{n}\ "[dir] 'Root directory for the book{n}\
(Defaults to the Current Directory when omitted)'", (Defaults to the Current Directory when omitted)'",

View File

@ -22,7 +22,8 @@ pub fn make_subcommand<'a, 'b>() -> App<'a, 'b> {
.about("Serves a book at http://localhost:3000, and rebuilds it on changes") .about("Serves a book at http://localhost:3000, and rebuilds it on changes")
.arg_from_usage( .arg_from_usage(
"-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\ "-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\
(If omitted, uses build.build-dir from book.toml or defaults to ./book)'", Relative paths are interpreted relative to the book's root directory.{n}\
If omitted, mdBook uses build.build-dir from book.toml or defaults to `./book`.'",
) )
.arg_from_usage( .arg_from_usage(
"[dir] 'Root directory for the book{n}\ "[dir] 'Root directory for the book{n}\

View File

@ -9,7 +9,8 @@ pub fn make_subcommand<'a, 'b>() -> App<'a, 'b> {
.about("Tests that a book's Rust code samples compile") .about("Tests that a book's Rust code samples compile")
.arg_from_usage( .arg_from_usage(
"-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\ "-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\
(If omitted, uses build.build-dir from book.toml or defaults to ./book)'", Relative paths are interpreted relative to the book's root directory.{n}\
If omitted, mdBook uses build.build-dir from book.toml or defaults to `./book`.'",
) )
.arg_from_usage( .arg_from_usage(
"[dir] 'Root directory for the book{n}\ "[dir] 'Root directory for the book{n}\

View File

@ -16,7 +16,8 @@ pub fn make_subcommand<'a, 'b>() -> App<'a, 'b> {
.about("Watches a book's files and rebuilds it on changes") .about("Watches a book's files and rebuilds it on changes")
.arg_from_usage( .arg_from_usage(
"-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\ "-d, --dest-dir=[dest-dir] 'Output directory for the book{n}\
(If omitted, uses build.build-dir from book.toml or defaults to ./book)'", Relative paths are interpreted relative to the book's root directory.{n}\
If omitted, mdBook uses build.build-dir from book.toml or defaults to `./book`.'",
).arg_from_usage( ).arg_from_usage(
"[dir] 'Root directory for the book{n}\ "[dir] 'Root directory for the book{n}\
(Defaults to the Current Directory when omitted)'", (Defaults to the Current Directory when omitted)'",