From a6ab4d8402eaa3ffcd6ac955fbd054c31d6c07c2 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Wed, 27 May 2020 02:52:59 +0800 Subject: [PATCH] Explained how you can configure redirects --- book-example/src/format/config.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/book-example/src/format/config.md b/book-example/src/format/config.md index c1a97aa7..e8b7e9aa 100644 --- a/book-example/src/format/config.md +++ b/book-example/src/format/config.md @@ -198,6 +198,10 @@ The following configuration options are available: 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 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: @@ -281,6 +285,10 @@ boost-paragraph = 1 expand = true heading-split-level = 3 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 @@ -291,7 +299,7 @@ conjunction with `mdbook test` to see the Markdown that `mdbook` is passing to `rustdoc`. 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 [output.markdown]