From 592fb17c705c617e511512ab09ce181193941933 Mon Sep 17 00:00:00 2001 From: Phaiax Date: Sun, 26 Nov 2017 19:52:59 +0100 Subject: [PATCH] Search: Add handlebars variable and do not load js libraries if search is disabled. --- src/renderer/html_handlebars/hbs_renderer.rs | 2 ++ src/theme/index.hbs | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 82d2d590..04d81aaf 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -413,6 +413,8 @@ fn make_data(book: &MDBook, config: &Config) -> Result + {{#if search}} + {{/if}} @@ -94,7 +96,9 @@
- + {{#if search}} + + {{/if}}

{{ book_title }}

@@ -106,6 +110,7 @@ + {{#if search}}
@@ -115,6 +120,7 @@
+ {{/if}}