Skip to content
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

Merged
merged 31 commits into from
Oct 5, 2023
Merged

Conversation

Br1ght0ne
Copy link
Contributor

@Br1ght0ne Br1ght0ne commented Aug 21, 2023

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's Cargo.toml (meaning no extra files with versions involved)

Checklist

  • I have linked to any relevant issues.
  • I have updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@Br1ght0ne Br1ght0ne added documentation Improvements or additions to documentation tech-debt Improves code quality or safety labels Aug 21, 2023
@Br1ght0ne Br1ght0ne self-assigned this Aug 21, 2023
@Br1ght0ne

This comment was marked as outdated.

Copy link
Contributor

@segfault-magnet segfault-magnet left a 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.

docs/book.toml Outdated Show resolved Hide resolved
Br1ght0ne added a commit to FuelLabs/github-actions that referenced this pull request Aug 22, 2023
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.
@sarahschwartz
Copy link
Contributor

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?

@sarahschwartz
Copy link
Contributor

sarahschwartz commented Aug 25, 2023

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.

iqdecay
iqdecay previously approved these changes Aug 31, 2023
iqdecay
iqdecay previously approved these changes Sep 10, 2023
Copy link
Member

@digorithm digorithm left a 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!

@Br1ght0ne Br1ght0ne enabled auto-merge (squash) September 29, 2023 07:53
Copy link
Contributor

@hal3e hal3e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work!

@Br1ght0ne Br1ght0ne merged commit c64de6b into master Oct 5, 2023
41 checks passed
@Br1ght0ne Br1ght0ne deleted the oleksii/mdbook-versions branch October 5, 2023 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation tech-debt Improves code quality or safety
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for referring to crate versions in 'the book'.
8 participants