bevy-website
bevy-website copied to clipboard
Allow building examples locally using helper script and zola config
The intention behind this PR is to allow contributors to easily build wasm examples locally, useful for example to include debug info.
For contributors, that means they now have access to:
- A script to build a number of examples, and generate the examples pages only for those built.
- A separate Zola config for serving the local assets, to be used after the above script.
There are a number of things about this (and the current setup as a whole) that I feel are not ideal:
- Mixture of bash scripts and multiple small rust CLIs, spread across both repos. This means theres no central place for some kinds of modifications to go, and some changes I would think are useful will require PRs against both repos. Thats enough of a hurdle I don't want to attempt those.
- The new script can only limit the amount of examples built, theres no way to choose a sepecific example. This is a limitation of tools/example-showcase in the bevy repo, which I did not want to touche. See first point.
- I had to write code to compare the different structures for example betweeen the paths
example-showcase build-wasm-examplesgenerates:2D Rendering/Bloom 2Dand the onesexample-showcase build-website-listgenerates:2d-rendering/bloom-2d