File tree 1 file changed +14
-12
lines changed
1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,20 @@ pub struct MDBook {
37
37
impl MDBook {
38
38
/// Create a new `MDBook` struct with root directory `root`
39
39
///
40
+ /// # Examples
41
+ ///
42
+ /// ```no_run
43
+ /// # extern crate mdbook;
44
+ /// # use mdbook::MDBook;
45
+ /// # use std::path::Path;
46
+ /// # fn main() {
47
+ /// let book = MDBook::new(Path::new("root_dir"));
48
+ /// # }
49
+ /// ```
50
+ ///
51
+ /// In this example, `root_dir` will be the root directory of our book and is specified in function
52
+ /// of the current working directory by using a relative path instead of an absolute path.
53
+ ///
40
54
/// Default directory paths:
41
55
///
42
56
/// - source: `root/src`
@@ -286,18 +300,6 @@ impl MDBook {
286
300
/// Parses the `book.json` file (if it exists) to extract the configuration parameters.
287
301
/// The `book.json` file should be in the root directory of the book.
288
302
/// The root directory is the one specified when creating a new `MDBook`
289
- ///
290
- /// ```no_run
291
- /// # extern crate mdbook;
292
- /// # use mdbook::MDBook;
293
- /// # use std::path::Path;
294
- /// # fn main() {
295
- /// let mut book = MDBook::new(Path::new("root_dir"));
296
- /// # }
297
- /// ```
298
- ///
299
- /// In this example, `root_dir` will be the root directory of our book and is specified in function
300
- /// of the current working directory by using a relative path instead of an absolute path.
301
303
302
304
pub fn read_config ( mut self ) -> Self {
303
305
You can’t perform that action at this time.
0 commit comments