Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is to avoid having to use build_book.py script. 1. Preprocessor is faster and doesn't use disk, as all communication is trough stdio. 2. It doesn't need to be executed explicitly. You can just use `mdbook build docs` and it will create correct documentation. 3. New script is shorter and simpler than old. Script is based on example from https://rust-lang.github.io/mdBook/for_developers/preprocessors.html and uses a function from build_book.py In book.toml the command used is a simple bash script instead of just `python ./sphinx_preprocessor.py` because the command is run in the directory the user executed it in, not the directory that book.toml is in (which is imho a poor design in this case), so in order to be able to run the command both from main dir and from docs dir, such a script locating the preprocessor is necessary.
- Loading branch information