This commit is contained in:
Matt Ickstadt 2018-07-25 12:20:48 -05:00
parent 0e1787c617
commit fd9d27e082
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/// Subcommand modules for the `mdbook` binary. //! Subcommand modules for the `mdbook` binary.
pub mod build; pub mod build;
pub mod clean; pub mod clean;

View File

@ -5,13 +5,13 @@ extern crate ws;
use self::iron::{ use self::iron::{
status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response, Set, status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response, Set,
}; };
#[cfg(feature = "watch")]
use super::watch;
use clap::{App, ArgMatches, SubCommand}; use clap::{App, ArgMatches, SubCommand};
use mdbook::errors::*; use mdbook::errors::*;
use mdbook::utils; use mdbook::utils;
use mdbook::MDBook; use mdbook::MDBook;
use std; use std;
#[cfg(feature = "watch")]
use super::watch;
use {get_book_dir, open}; use {get_book_dir, open};
struct ErrorRecover; struct ErrorRecover;

View File

@ -370,7 +370,8 @@ impl Renderer for HtmlHandlebars {
.chain_err(|| "Unable to copy across additional CSS and JS")?; .chain_err(|| "Unable to copy across additional CSS and JS")?;
// Render search index // Render search index
#[cfg(feature = "search")] { #[cfg(feature = "search")]
{
let search = html_config.search.unwrap_or_default(); let search = html_config.search.unwrap_or_default();
if search.enable { if search.enable {
super::search::create_files(&search, &destination, &book)?; super::search::create_files(&search, &destination, &book)?;