Fix broken links in docs - #1473
Open
AdrianDAlessandro wants to merge 6 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1473 +/- ##
=======================================
Coverage 89.78% 89.78%
=======================================
Files 60 60
Lines 8439 8439
Branches 8439 8439
=======================================
Hits 7577 7577
Misses 545 545
Partials 317 317 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AdrianDAlessandro
marked this pull request as ready for review
August 10, 2026 16:08
AdrianDAlessandro
force-pushed
the
fix-broken-links
branch
from
August 10, 2026 16:09
81c8cf1 to
f01eaaf
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates documentation URL generation and link-checking to address broken links in the generated docs (including rustdoc pages) and to make CI’s link checker operate against the built documentation output.
Changes:
- Update
docs_url!to support an explicit documentation “version segment” (e.g.dev) when composing documentation URLs. - Fix an in-code rustdoc link to point at the dev docs location.
- Update the docs link-checking workflow to resolve absolute paths against the built
book/output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/simulation/prices.rs | Adjust rustdoc link to use the dev docs URL segment. |
| src/lib.rs | Extend docs_url! macro to accept an explicit version segment for URL construction. |
| docs/api/muse2/README.md | Update the published API-docs URL to the dev docs location. |
| .github/workflows/check-docs.yml | Configure Lychee to resolve absolute links relative to the built book/ output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| //! Code for calculating commodity prices used by the simulation. | ||
| //! | ||
| #![doc = concat!("See <", crate::docs_url!("/model/prices.html"), ">")] | ||
| #![doc = concat!("See <", crate::docs_url!("dev", "model/prices.html"), ">")] |
| ) | ||
| docs_url!(concat!("v", env!("CARGO_PKG_VERSION")), $suffix) | ||
| }; | ||
| ($version:expr, $suffix:literal) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There are some broken links in the docs. Some are causing PR failures, but they don't necessarily line up with the broken links in the deployed docs. This PR will address these broken links.
Opening in draft because the CI workflow needs to be updated so the link checker is actually checking against the equivalent of the deployed docs.Edit: Ignoring broken links in old versions of the docs. These would be very difficult to continue to keep up to date. One problem is that this means the most recent release will include some broken links.Fixes #1408
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks