Explained how you can configure redirects

This commit is contained in:
Michael-F-Bryan 2020-05-27 02:52:59 +08:00
parent 4c2318922f
commit a6ab4d8402
No known key found for this signature in database
GPG Key ID: E9C602B0D9A998DC
1 changed files with 9 additions and 1 deletions

View File

@ -198,6 +198,10 @@ The following configuration options are available:
an icon link will be output in the menu bar of the book. an icon link will be output in the menu bar of the book.
- **git-repository-icon:** The FontAwesome icon class to use for the git - **git-repository-icon:** The FontAwesome icon class to use for the git
repository link. Defaults to `fa-github`. repository link. Defaults to `fa-github`.
- **redirect:** A subtable used for generating redirects when a page is moved.
The table contains key-value pairs where the key is the path to the moved
page, relative to the build directory and the value can be an ordinary URL
or the *absolute* path to another page in the book
Available configuration options for the `[output.html.fold]` table: Available configuration options for the `[output.html.fold]` table:
@ -281,6 +285,10 @@ boost-paragraph = 1
expand = true expand = true
heading-split-level = 3 heading-split-level = 3
copy-js = true copy-js = true
[output.html.redirect]
"other-installation-methods.html" = "/infra/other-installation-methods.html"
"bibliography.html" = "https://rustc-dev-guide.rust-lang.org/appendix/bibliography.html"
``` ```
### Markdown Renderer ### Markdown Renderer
@ -291,7 +299,7 @@ conjunction with `mdbook test` to see the Markdown that `mdbook` is passing
to `rustdoc`. to `rustdoc`.
The Markdown renderer is included with `mdbook` but disabled by default. The Markdown renderer is included with `mdbook` but disabled by default.
Enable it by adding an emtpy table to your `book.toml` as follows: Enable it by adding an empty table to your `book.toml` as follows:
```toml ```toml
[output.markdown] [output.markdown]