-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.readthedocs.yaml
26 lines (23 loc) · 1011 Bytes
/
.readthedocs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-lts-latest
tools:
python: "3.12"
rust: "latest"
commands:
# Generate "book/theme/index.hbs" as "skeleton" of the generated pages.
- book/update-theme.py
# Install mdbook.
- mkdir -p $HOME/bin
- curl --location --silent --show-error --fail https://github.com/cargo-bins/cargo-quickinstall/releases/download/mdbook-0.4.40/mdbook-0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xzvvf - -C $HOME/bin
# Convert the book to HTML.
- $HOME/bin/mdbook build book --dest-dir $READTHEDOCS_OUTPUT/html
# Make the ads readable.
- cat book/ethicalads-theme.css >> $READTHEDOCS_OUTPUT/html/css/general.css
# We are done!
- cp book/404.html $READTHEDOCS_OUTPUT/html
# Build and copy the API docs
- cargo install cargo-docs-rs
- RUSTC_BOOTSTRAP=1 cargo docs-rs -p askama
- cp -a -r -t $READTHEDOCS_OUTPUT/html/ target/x86_64-unknown-linux-gnu/doc/