I’m one of the maintainers of mdbook and recently started working on support for alternate backends. I’ve made an experimental backend for generating books in the
EPUB format and was hoping to get some feedback and/or feature requests.
It’s still very much a work in progress (e.g. styling and nesting chapters don’t yet work), but I’m able to generate a copy of The Book and Rust-By-Example without too many issues.
(copied verbatim from the README’s Getting Started)
The support for alternative
mdbookbackends is still very much in the
experimental phase, so getting everything working isn’t as simple as a
cargo install mdbook-epub.
First you’ll need to install a patched version of
$ cargo install --git https://github.com/Michael-F-Bryan/mdbook --branch alternate_backends
Then you’ll need to install the
EPUBbackend (a program called
directly from its git repository.
$ cargo install --git https://github.com/Michael-F-Bryan/mdbook-epub
Next you need to let
mdbookknow to use the alternate renderer by updating
book.tomlfile. This is done by simply adding an empty
[book] title = "mdBook Documentation" description = "Create book from markdown files. Like Gitbook but implemented in Rust" author = "Mathieu David" [output.html] mathjax-support = true + [output.epub]
Now everything is set up, just run
mdbookas normal and the output directory
book/by default) should now contain an extra file called
mdBook Documentation.epub(substituting in whatever your book’s title is).