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

    {{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)}}

  • 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")}}

Modules from std will link to https://doc.rust-lang.org. Other modules (like bevy_render::render_graph ) will link to 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.

Bevy Markdown Docs #

Bevy's CI will check markdown files like Readmes using markdownlint. If you contribute to markdown files consider installing markdownlint-cli to locally lint your changes. Running markdownlint -f -c .github/linters/.markdown-lint.yml . in the root directory of the Bevy project will apply the same linting rules to your changes as the CI workflow.