-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Generate links to definition in rustdoc source code pages #2611
Comments
Doesn't this need to be enabled by the one building the docs which is not us but docs.rs? The doc built during CI are not published anywhere, having the links there wouldn't be visible |
docs.rs uses nightly rustdoc. It also allows you to pass arbitrary flags to rustdoc using a section in |
Marking this as unblocked. We now use nightly to build our docs, and so does docs.rs. |
…docs.bevyengine.org (#12965) # Objective - Fix issue #2611 ## Solution - Add `--generate-link-to-definition` to all the `rustdoc-args` arrays in the `Cargo.toml`s (for docs.rs) - Add `--generate-link-to-definition` to the `RUSTDOCFLAGS` environment variable in the docs workflow (for dev-docs.bevyengine.org) - Document all the workspace crates in the docs workflow (needed because otherwise only the source code of the `bevy` package will be included, making the argument useless) - I think this also fixes #3662, since it fixes the bug on dev-docs.bevyengine.org, while on docs.rs it has been fixed for a while on their side. --- ## Changelog - The source code viewer on docs.rs now includes links to the definitions.
Closing as fixed. |
How can Bevy's documentation be improved?
rust-lang/rust#84176 (just merged) allows rustdoc to generate links to definitions in source code pages. This new feature is disabled by default. Once this moves off nightly we should enable the feature with the
--generate-link-to-definition
option.The text was updated successfully, but these errors were encountered: