Export the mdbook version from the crate root
This commit is contained in:
parent
ced74ca4dd
commit
206a00915b
|
@ -114,6 +114,12 @@ pub mod renderer;
|
|||
pub mod theme;
|
||||
pub mod utils;
|
||||
|
||||
/// The current version of `mdbook`.
|
||||
///
|
||||
/// This is provided as a way for custom preprocessors and renderers to do
|
||||
/// compatibility checks.
|
||||
pub const MDBOOK_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
pub use book::BookItem;
|
||||
pub use book::MDBook;
|
||||
pub use config::Config;
|
||||
|
|
|
@ -26,8 +26,6 @@ use book::Book;
|
|||
use config::Config;
|
||||
use errors::*;
|
||||
|
||||
const MDBOOK_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// An arbitrary `mdbook` backend.
|
||||
///
|
||||
/// Although it's quite possible for you to import `mdbook` as a library and
|
||||
|
@ -78,7 +76,7 @@ impl RenderContext {
|
|||
RenderContext {
|
||||
book: book,
|
||||
config: config,
|
||||
version: MDBOOK_VERSION.to_string(),
|
||||
version: ::MDBOOK_VERSION.to_string(),
|
||||
root: root.into(),
|
||||
destination: destination.into(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue