Reputation: 18530
I'm trying to download The Rust Programming Language book in epub format using the mdbook-epub tool, but the output file doesn't contain any code snippets. Instead it has placeholders like this:
{{#include ../listings/ch02-guessing-game-tutorial/listing-02-01/src/main.rs:io}}
Some of those placeholders use rustdoc_include
.
How can I generate a file with the embedded snippets?
Upvotes: 0
Views: 227
Reputation: 18530
I was using a mismatching version of mdbook
. This solves the problem:
cargo install mdbook-epub -v 0.3.0
cargo install mdbook --version 0.3.7
For completeness, the book can then be generated by editing book.toml
and adding the [output.epub]
line at the end. Then mdbook build
generates the epub file at book/epub/The Rust Programming Language.epub
.
Upvotes: 1