Personal implementation of Gitbook in Rust
This project is still in it's early days. For more information about what is left on my to-do list, check the issue tracker
To have an idea of what a rendered book looks like,take a look at the Documentation. It is rendered by the latest version of mdBook.
git clone --depth=1 https://github.com/azerupi/mdBook.git
cd mdBook
cargo build --release
The executable mdbook
will be in the ./target/release
folder, this should be added to the path.
If you want to regenerate the css (stylesheet), make sure that you installed stylus
and nib
from npm
because it is used to compile the stylesheets
Install node.js
npm install -g stylus nib
Then build with the regenerate-css
feature:
cargo build --release --features="regenerate-css"
There are two main parts of this project:
If you run mdbook init
in a directory, it will create a couple of folders and files you can start with.
This is the strucutre it creates at the moment:
book-test/
├── book
└── src
├── chapter_1.md
└── SUMMARY.md
book
and src
are both directories. src
contains the markdown files that will be used to render the ouput to the book
directory.
Please, take a look at the Documentation for more information.
Use mdbook build
in the directory to render the book. You can find more information in the Documentation
Aside from the command line interface, this crate can also be used as a library. This means that you could integrate it in an existing project, like a webapp for example. Since the command line interface is just a wrapper around the library functionality, when you use this crate as a library you have full access to all the functionality of the command line interface with and easy to use API and more!
See the Documentation and the API docs for more information.
Contributions are highly apreciated. Here are some ideas:
Enhancement
. Just pick one that looks interesting. The majority of the tasks are small enough to be tackled by people who are unfamiliar with the project.If you have an idea for improvement, create a new issue. Or a pull request if you can :)
All the code is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file