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
<pre data-shortcode>{</pre>{rust_type(type="struct" crate="std" mod="collections" name="HashMap")}<pre data-shortcode>}</pre>
Short Type: HashMap
<pre data-shortcode>{</pre>{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true)}<pre data-shortcode>}</pre>
Plural Type: HashMaps
<pre data-shortcode>{</pre>{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true, plural=true)}<pre data-shortcode>}</pre>
Function: HashMap::insert()
<pre data-shortcode>{</pre>{rust_type(type="struct" crate="std" mod="collections" name="HashMap" no_mod=true method="insert")}<pre data-shortcode>}</pre>
Module: std::collections
<pre data-shortcode>{</pre>{rust_mod(crate="std" mod="collections")}<pre data-shortcode>}</pre>
Modules from std
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.