From c3ad517009800c448d08211c1ab60e032cfc7049 Mon Sep 17 00:00:00 2001 From: TrialDragon Date: Tue, 13 Aug 2024 11:29:16 -0700 Subject: [PATCH] Update the learning material code snippet portion of contributing docs It now uses learning-code-examples instead of code-validation. --- content/contributing/helping-out/writing-docs.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/contributing/helping-out/writing-docs.md b/content/contributing/helping-out/writing-docs.md index 52ae031f63..b41055c018 100644 --- a/content/contributing/helping-out/writing-docs.md +++ b/content/contributing/helping-out/writing-docs.md @@ -55,11 +55,15 @@ To check out any local changes you've made: A local server should start and you should be able to access a local version of the website from there. -:::warning -The code in the book is compiled and tested to make sure that the examples work for readers. -::: +{% callout(type="warning") %} +The code in the learning materials (e.g., Bevy Book, Quick Start Guide, Advanced Examples, etc.) is compiled, formatted, and tested to make sure that the examples work for readers. +{% end %} + +To validate your code snippets either run `validate_examples.sh` which resides in the `learning-code-examples` directory (and is the recommended way to use `learning-code-examples`), or from the root of the project run `cd learning-code-examples && cargo check --examples && cargo clippy --examples && cargo fmt --check`. -To check your local changes, move into the `code-validation` folder of this project using `cd code-validation`, and then run `cargo test`. If you write a new section of the book, you have to add it in `code-validation/src/lib.rs` to enable code validation for it. +{% callout() %} +[See the `learning-code-examples` README.md for more info.](https://github.com/bevyengine/bevy-website/blob/main/learning-code-examples/README.md) +{% end %} ## Learning material structure