The Bevy Book is open source, along with the rest of this website. Check out the Bevy Website repository on GitHub. The Bevy Book content is written in Markdown.
The website is built using the Zola static site generator. Download Zola, then do the following:
git clone https://github.com/bevyengine/bevy-website.git cd bevy-website
zola serve
A local server should start and you should be able to access a local version of the website from there.
We made an extension to the markdown syntax that makes linking to Rust API docs nicer. It also gives the links special formatting. Here are some examples:
Full Type Path:
std::collections::HashMap
{{rust_type(type="struct" crate="std" mod="collections" name="HashMap")}}
Short Type:
HashMap
{{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true)}}
Plural Type:
HashMaps
{{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true, plural=true)}}
Function:
HashMap::insert()
{{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true method="insert")}}
Module:
std::collections
{{rust_mod(crate="std" mod="collections")}}
std::std
modules will link to https://doc.rust-lang.org. Other modules (like
bevy_render::render_graph
) will link to https://docs.rs
Bevy's Rust API Docs are automatically generated from the latest Bevy source code. If you add Rust documentation comments to the Bevy codebase, the API docs will be automatically updated.