Struct mdbook::config::bookconfig::BookConfig [] [src]

pub struct BookConfig { /* fields omitted */ }

Configuration struct containing all the configuration options available in mdBook.

Methods

impl BookConfig
[src]

Creates a new BookConfig struct with as root path the path given as parameter. The source directory is root/src and the destination for the rendered book is root/book.

let root = PathBuf::from("directory/to/my/book");
let config = BookConfig::new(&root);

assert_eq!(config.get_root(), &root);
assert_eq!(config.get_source(), PathBuf::from("directory/to/my/book/src"));
assert_eq!(config.get_html_config(), &HtmlConfig::new(PathBuf::from("directory/to/my/book")));

Builder method to set the source directory

Builder method to set the book's title

Builder method to set the book's description

Builder method to set the book's authors

The JSON configuration file is deprecated and should not be used anymore. Please, migrate to the TOML configuration file.

The JSON configuration file is deprecated and should not be used anymore. Please, migrate to the TOML configuration file.

Returns the authors of the book as specified in the configuration file

Returns the configuration for the HTML renderer or None of there isn't any

Trait Implementations

impl Debug for BookConfig
[src]

Formats the value using the given formatter.

impl Clone for BookConfig
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for BookConfig
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for BookConfig
[src]