Open
Description
Directions
lxc launch ubuntu:18.04 rustbook-builds
lxc exec rustbook-builds -- sudo --login --user ubuntu
sudo apt-get update
sudo apt-get install -y git build-essential
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
cargo install mdbook --vers 0.3.7
cargo install mdbook-epub
git clone https://github.com/rust-lang/book rust-book
cd rust-book
- Modify
book.toml
- see below
mdbook build
ls -lh book/epub/
exit
lxc file pull rustbook-builds/home/ubuntu/rust-book/book/epub/'The Rust Programming Language.epub' ./
Since I build within an LXD container, the above will generate a new LXD container, build the book and pull the newly generated epub from the container into the host environment.
Modifications to book.toml
ubuntu@rustbook-builds:~/rust-book$ git diff
diff --git a/book.toml b/book.toml
index 6797f2df..f1797bde 100644
--- a/book.toml
+++ b/book.toml
@@ -5,3 +5,6 @@ author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Comm
[output.html]
additional-css = ["ferris.css", "theme/2018-edition.css"]
additional-js = ["ferris.js"]
+
+[output.epub]
+