-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Examples metadata in Cargo.toml #4741
Conversation
95c0451
to
a33c622
Compare
I like the idea. Assuming it gets merged, would it be possible to use the comments added in #4438 for the description? This way there would be no duplication at all. |
Looking at a few of the doc added in #4438, some would be too long, some contains intra doc links that would just fail without rust-analyser or rustdoc. I don't think the description here and the doc there have the same goal, so probably not |
92aa17b
to
cd19342
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can, I'd really like to be able to auto-generate the table of contents and store it on a useful site. I'm sick of updating the README file and it gets really unwieldy to navigate.
Tags and search would both be incredible.
@mockersf can you mark this as draft until it's ready so the "stuff to review" search filters work correctly? |
I may do that sooner than I expected as I can't find a way to cleanly push a commit to a PR without a token... I think I'll create a full crate for examples, each example a module, and build its doc with the dev doc website... |
8271d19
to
ff53b7b
Compare
I'm fully on board for consolidating example metadata into Instead, I think we should generate an "examples" page on the bevy website using Cargo.toml metadata, remove the current examples readme, and replace all links to the examples readme with links to the new generated bevyengine.org page. |
👍 I'll remove that part to just leave a job checking if the page need to be regenerated, and logging what to do
I agree, but I think this is quite a lot more work. The examples page is the second step in bevyengine/bevy-website#299, this PR would be just the first step. Just replacing the manually updated readme by a file updated by a tera template is a start in the right direction that isn't a lot of work when we'll remove it for a better website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the current state of things!
- Ensures the new metadata system is adopted
- Removes the need to redundantly define information (thanks to the update command)
- Works within the confines of the current README system while we wait for a bevy-website solution
bors r+ |
# Objective - Have information about examples only in one place that can be used for the repo and for the website (and remove the need to keep a list of example to build for wasm in the website https://github.com/bevyengine/bevy-website/blob/75acb730406ef9c5928d37daf8bb32e4dbeb8b13/generate-wasm-examples/generate_wasm_examples.sh#L92-L99) ## Solution - Add metadata about examples in `Cargo.toml` - Build the `examples/README.md` from a template using those metadata. I used tera as the template engine to use the same tech as the website. - Make CI fail if an example is missing metadata, or if the readme file needs to be updated (the command to update it is displayed in the failed step in CI) ## Remaining To Do - After the next release with this merged in, the website will be able to be updated to use those metadata too - I would like to build the examples in wasm and make them available at http://dev-docs.bevyengine.org/ but that will require more design - bevyengine/bevy-website#299 for other ToDos Co-authored-by: Readme <[email protected]>
# Objective - Have information about examples only in one place that can be used for the repo and for the website (and remove the need to keep a list of example to build for wasm in the website https://github.com/bevyengine/bevy-website/blob/75acb730406ef9c5928d37daf8bb32e4dbeb8b13/generate-wasm-examples/generate_wasm_examples.sh#L92-L99) ## Solution - Add metadata about examples in `Cargo.toml` - Build the `examples/README.md` from a template using those metadata. I used tera as the template engine to use the same tech as the website. - Make CI fail if an example is missing metadata, or if the readme file needs to be updated (the command to update it is displayed in the failed step in CI) ## Remaining To Do - After the next release with this merged in, the website will be able to be updated to use those metadata too - I would like to build the examples in wasm and make them available at http://dev-docs.bevyengine.org/ but that will require more design - bevyengine/bevy-website#299 for other ToDos Co-authored-by: Readme <[email protected]>
# Objective - Have information about examples only in one place that can be used for the repo and for the website (and remove the need to keep a list of example to build for wasm in the website https://github.com/bevyengine/bevy-website/blob/75acb730406ef9c5928d37daf8bb32e4dbeb8b13/generate-wasm-examples/generate_wasm_examples.sh#L92-L99) ## Solution - Add metadata about examples in `Cargo.toml` - Build the `examples/README.md` from a template using those metadata. I used tera as the template engine to use the same tech as the website. - Make CI fail if an example is missing metadata, or if the readme file needs to be updated (the command to update it is displayed in the failed step in CI) ## Remaining To Do - After the next release with this merged in, the website will be able to be updated to use those metadata too - I would like to build the examples in wasm and make them available at http://dev-docs.bevyengine.org/ but that will require more design - bevyengine/bevy-website#299 for other ToDos Co-authored-by: Readme <[email protected]>
# Objective - Have information about examples only in one place that can be used for the repo and for the website (and remove the need to keep a list of example to build for wasm in the website https://github.com/bevyengine/bevy-website/blob/75acb730406ef9c5928d37daf8bb32e4dbeb8b13/generate-wasm-examples/generate_wasm_examples.sh#L92-L99) ## Solution - Add metadata about examples in `Cargo.toml` - Build the `examples/README.md` from a template using those metadata. I used tera as the template engine to use the same tech as the website. - Make CI fail if an example is missing metadata, or if the readme file needs to be updated (the command to update it is displayed in the failed step in CI) ## Remaining To Do - After the next release with this merged in, the website will be able to be updated to use those metadata too - I would like to build the examples in wasm and make them available at http://dev-docs.bevyengine.org/ but that will require more design - bevyengine/bevy-website#299 for other ToDos Co-authored-by: Readme <[email protected]>
Objective
Solution
Cargo.toml
examples/README.md
from a template using those metadata. I used tera as the template engine to use the same tech as the website.Remaining To Do