lxc file pull rustbook-builds/home/ubuntu/rust-cli-book/book/epub/'Command Line Applications in Rust.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:~/book$ git diff
diff --git a/book.toml b/book.toml
index c7b4b3e..a60cf81 100644
--- a/book.toml
+++ b/book.toml
@@ -15,3 +15,6 @@ site-url = "/book/"
# Linkcheck doesn't find images/SVG so it's not enabled for now
# [output.linkcheck]
+
+[output.epub]
+
Directions
lxc launch ubuntu:22.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 mdbook-epub
git clone https://github.com/rust-cli/book rust-cli-book
cd rust-cli-book
book.toml
mdbook build
ls -lh book/epub/
exit
lxc file pull rustbook-builds/home/ubuntu/rust-cli-book/book/epub/'Command Line Applications in Rust.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:~/book$ git diff
Output
References