From 10b69e60c8e819fd221ef2fd90ccecd9bb144684 Mon Sep 17 00:00:00 2001 From: Jason Liquorish Date: Mon, 15 Oct 2018 21:40:59 +0100 Subject: [PATCH] Add documentation and tests --- book-example/src/format/config.md | 1 + src/config.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/book-example/src/format/config.md b/book-example/src/format/config.md index 3f0fa278..5a3b97ba 100644 --- a/book-example/src/format/config.md +++ b/book-example/src/format/config.md @@ -132,6 +132,7 @@ The following configuration options are available: - **theme:** mdBook comes with a default theme and all the resource files needed for it. But if this option is set, mdBook will selectively overwrite the theme files with the ones found in the specified folder. +- **default-theme:** The theme to be used by default. Defaults to `light`. - **curly-quotes:** Convert straight quotes to curly quotes, except for those that occur in code blocks and code spans. Defaults to `false`. - **google-analytics:** If you use Google Analytics, this option lets you enable diff --git a/src/config.rs b/src/config.rs index bc57472c..d5f9aa74 100644 --- a/src/config.rs +++ b/src/config.rs @@ -570,6 +570,7 @@ mod tests { [output.html] theme = "./themedir" + default-theme = "rust" curly-quotes = true google-analytics = "123456" additional-css = ["./foo/bar/baz.css"] @@ -609,6 +610,7 @@ mod tests { google_analytics: Some(String::from("123456")), additional_css: vec![PathBuf::from("./foo/bar/baz.css")], theme: Some(PathBuf::from("./themedir")), + default_theme: Some(String::from("rust")), playpen: playpen_should_be, ..Default::default() };