Skip to content

Commit

Permalink
Docs: Remove build_book.py script and it's mentions
Browse files Browse the repository at this point in the history
This script is no longer necessary and just double the work
  • Loading branch information
Lorak-mmk committed Jan 12, 2024
1 parent 8040546 commit 9b8ef00
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 75 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ jobs:
run: cargo build --verbose --examples
- name: Build the book
run: mdbook build docs
- name: Build the book using the script
run: python3 docs/build_book.py
- name: Run book tests
run: mdbook test -L target/debug/deps docs
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,20 @@ But they are removed when building the book
cargo install mdbook
```

Build the book (simple method, contains `Sphinx` artifacts):
Book build process uses preprocessor to remove Sphinx artifacts.
Due to limitation of mdbook, it can only be built either from main directory,
using `mdbook X docs` or from `docs` directory, using `mdbook X`, where
`X` is mdbook command such as `build` / `serve` / `test` etc.

If the book is built from another directory (e.g. scylla, using `mdbook build ../docs`),
preprocessor won't be found, so the result will contain Sphinx artifacts.
Build the book.
```bash
mdbook build docs
# HTML will be in docs/book
```
To build the release version use a script which automatically removes `Sphinx` chunks:
```bash
python3 docs/build_book.py
# HTML will be in docs/book/scriptbuild/book
```
Or serve it on a local http server (automatically refreshes on changes)
```bash
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ build:

.PHONY: docs
docs:
./docs/build_book.py
mdbook build docs

.PHONY: up
up:
Expand Down
66 changes: 0 additions & 66 deletions docs/build_book.py

This file was deleted.

0 comments on commit 9b8ef00

Please # to comment.