-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore(docs): use variables for docs.rs links #1098
Conversation
Now docs.rs links are versioned using `mdbook-variables` preprocessor.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Left a comment.
Also, we can replace this line from the docs as well:
Note We're using version
0.46
of the SDK, which is the latest version at the time of this writing.
In FuelLabs/fuels-rs#1098, a new format for documentation links in `fuels-rs` book is introduced to allow for versioned Rust docs links. Examples: - `docs.rs/fuels/{{versions.fuels}}/fuels/...` - `docs.rs/fuels-types/{{versions.fuels_types}}/fuels-types/...` These variables will be replaced with actual versions at build time. However, the link checker (MLC) runs on `.md` files before the build, and as such flags these links as incorrect. My current solution is to ignore these links in the checker for now, unless some post-build checking (or similar) is implemented at a later date.
what are your thoughts on creating a branch that can be used for publishing .md files in the docs that have the version applied already, and just running the docs-CI there so that the links are still checked? |
Another option is to use our own script in place of the preprocessor that can be run before the docs-CI. I think we should check these links somehow. |
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.
Uh oh, some conflicts. PR looks good to go once the conflicts are gone!
6a6484d
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.
LGTM. Nice work!
Close #1097.
The version replacer script will run before
mdbook-docs.yml
on CI, replacing all references to{{versions.<package>}}
with the versions taken from workspace'sCargo.toml
(meaning no extra files with versions involved)Checklist