Contributing Docs

The Bevy Book

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.

Building the Website

The website is built using the Zola static site generator. Download Zola, then do the following:

  1. Clone the Bevy Website git repo and move to that directory:
    git clone https://github.com/bevyengine/bevy-website.git
    cd bevy-website
    
  2. Start the Zola server
    zola serve
    

A local server should start and you should be able to access a local version of the website from there.

Rust API Doc Syntax

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>

std::std modules will link to [https://doc.rust-lang.org](https://doc.rust-lang.org/std/index.html). Other modules (like
bevy_render::render_graph
) will link to [https://docs.rs](https://docs.rs)

Rust API Docs

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.