|
1 | 1 | //! # mdBook
|
2 | 2 | //!
|
3 |
| -//! **mdBook** is similar to Gitbook but implemented in Rust. |
| 3 | +//! **mdBook** is similar to GitBook but implemented in Rust. |
4 | 4 | //! It offers a command line interface, but can also be used as a regular crate.
|
5 | 5 | //!
|
6 |
| -//! This is the API doc, but you can find a [less "low-level" documentation here](../index.html) |
7 |
| -//! that contains information about the command line tool, format, structure etc. |
8 |
| -//! It is also rendered with mdBook to showcase the features and default theme. |
| 6 | +//! This is the API doc, the [user guide] is also available if you want |
| 7 | +//! information about the command line tool, format, structure etc. It is also |
| 8 | +//! rendered with mdBook to showcase the features and default theme. |
9 | 9 | //!
|
10 | 10 | //! Some reasons why you would want to use the crate (over the cli):
|
11 | 11 | //!
|
|
52 | 52 | //!
|
53 | 53 | //! ## Implementing a new Renderer
|
54 | 54 | //!
|
55 |
| -//! If you want to create a new renderer for mdBook, the only thing you have to do is to implement |
56 |
| -//! the [Renderer trait](renderer/renderer/trait.Renderer.html) |
| 55 | +//! If you want to create a new renderer for mdBook, the only thing you have to |
| 56 | +//! do is to implement the [Renderer](renderer/renderer/trait.Renderer.html) |
| 57 | +//! trait. |
57 | 58 | //!
|
58 | 59 | //! And then you can swap in your renderer like this:
|
59 | 60 | //!
|
|
71 | 72 | //! book.set_renderer(your_renderer);
|
72 | 73 | //! # }
|
73 | 74 | //! ```
|
74 |
| -//! If you make a renderer, you get the book constructed in form of `Vec<BookItems>` and you get |
75 |
| -//! the book config in a `BookConfig` struct. |
76 | 75 | //!
|
77 |
| -//! It's your responsability to create the necessary files in the correct directories. |
| 76 | +//! If you make a renderer, you get the book constructed in form of |
| 77 | +//! `Vec<BookItems>` and you get ! the book config in a `BookConfig` struct. |
| 78 | +//! |
| 79 | +//! It's your responsability to create the necessary files in the correct |
| 80 | +//! directories. |
78 | 81 | //!
|
79 | 82 | //! ## utils
|
80 | 83 | //!
|
81 |
| -//! I have regrouped some useful functions in the [utils](utils/index.html) module, like the |
82 |
| -//! following function [`utils::fs::create_file(path: |
83 |
| -//! &Path)`](utils/fs/fn.create_file.html) |
| 84 | +//! I have regrouped some useful functions in the [utils](utils/index.html) |
| 85 | +//! module, like the following function [`utils::fs::create_file(path: |
| 86 | +//! &Path)`](utils/fs/fn.create_file.html). |
84 | 87 | //!
|
85 | 88 | //! This function creates a file and returns it. But before creating the file
|
86 | 89 | //! it checks every directory in the path to see if it exists, and if it does
|
87 | 90 | //! not it will be created.
|
88 | 91 | //!
|
89 | 92 | //! Make sure to take a look at it.
|
| 93 | +//! |
| 94 | +//! [user guide]: https://rust-lang-nursery.github.io/mdBook/ |
90 | 95 |
|
91 | 96 | #[macro_use]
|
92 | 97 | extern crate error_chain;
|
|
0 commit comments