This tool generates Typst documentation in Markdown and builds an MdBook from it.
To generate the documentation, you must have the Rust toolchain, including Cargo, installed.
Additionally, you need Python installed with the packages listed in requirements.txt.
You can install them by running:
pip install -r requirements.txtTo obtain the source data used for generating the documentation, you need to clone the Typst repository and run the following command inside it:
cargo run --package typst-docs -- --assets-dir <asset-output-dir> --out-file <output-json-file>Make sure to specify a valid asset directory and output file.
python3 main.py <asset-dir> <json-file> <build-dir>After execution, you will find the Markdown files and assets in the output directory.
They are ready to be viewed with any Markdown viewer.
To build a complete documentation set with search, summaries, and themes, this script generates additional files for MdBook.
If you do not have MdBook installed, you can follow the installation guide here.
Once MdBook is installed, navigate to your build directory and run:
mdbook serveThe URL for the page should be displayed in your console.
