Alternate mdbook backends

#1

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.

Installation Instructions

(copied verbatim from the README’s Getting Started)

The support for alternative mdbook backends 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 mdbook.

$cargo install --git https://github.com/Michael-F-Bryan/mdbook --branch alternate_backends  Then you’ll need to install the EPUB backend (a program called mdbook-epub) directly from its git repository. $ cargo install --git https://github.com/Michael-F-Bryan/mdbook-epub


Next you need to let mdbook know to use the alternate renderer by updating
your book.toml file. This is done by simply adding an empty output.epub
table.

[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 mdbook as 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).