summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorRoss MacArthur <ross@macarthur.io>2020-03-30 10:38:37 +0200
committerEric Huss <eric@huss.org>2020-09-22 11:40:02 -0700
commite0b247e9d6ec16c66d9eb630c992b4a9a49108d9 (patch)
treef43ceec8d2b460cc4d18f9bccf193b86eaaf7f22 /src/config.rs
parentdb8a2821eac4ee8ce1b6b93885372d4df9a32f24 (diff)
Add config option to disable print html, css, and icon
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index ef6bc687..91d40300 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -495,6 +495,8 @@ pub struct HtmlConfig {
/// Playground settings.
#[serde(alias = "playpen")]
pub playground: Playground,
+ /// Print settings.
+ pub print: Print,
/// Don't render section labels.
pub no_section_label: bool,
/// Search settings. If `None`, the default will be used.
@@ -542,6 +544,7 @@ impl Default for HtmlConfig {
additional_js: Vec::new(),
fold: Fold::default(),
playground: Playground::default(),
+ print: Print::default(),
no_section_label: false,
search: None,
git_repository_url: None,
@@ -566,6 +569,20 @@ impl HtmlConfig {
}
}
+/// Configuration for how to render the print icon, print.html, and print.css.
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "kebab-case")]
+pub struct Print {
+ /// Whether print support is enabled.
+ pub enable: bool,
+}
+
+impl Default for Print {
+ fn default() -> Self {
+ Self { enable: true }
+ }
+}
+
/// Configuration for how to fold chapters of sidebar.
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default, rename_all = "kebab-case")]