Repository navigation
rustdoc: add flag to control the html_root_url of dependencies - #51384
Conversation
|
r? @frewsxcv (rust_highfive has picked a reviewer for you, use r? to override) |
|
r? @rust-lang/rustdoc @onur - I modified this slightly from the version you currently use on docs.rs. Mainly, i changed the code to not hard-code docs.rs, by adding the |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
This should probably require passing the full URL like I guess this will fix #19603? |
That's probably a better solution. @onur, will this work out on your end?
Looks like it! I forgot there was an issue for this, haha. |
|
@QuietMisdreavus thank you very much for porting this change. Yes I think @ollie27's solution is better, and it will allow anyone to create his own documentation repository. I'll test this as soon as I can and return to you. |
1596678 to
696e5bd
Compare
|
I've force-pushed a version that uses the single |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
878c8fa to
8c5bf91
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
8c5bf91 to
fcb54f6
Compare
|
Ping from triage @rust-lang/rustdoc! This PR needs your review. |
|
It's up to @onur in here. :) |
|
r? @onur Edit: they're not a member of the org so they can't be assigned to the PR. |
|
@onur will just give his approval and at this point I'll |
|
Ping from triage @onur! This PR needs your review. |
|
Ping from triage @onur will you have time to review this PR? |
|
Ping from triage @rust-lang/rustdoc , guys, this PR needs a new reviewer. |
|
We were specifically asking for @onur's expertise, as this feature was written for use within docs.rs. |
|
You should ask to @onur to review directly on IRC. :) |
|
Ping from triage @onur will you have time to review this PR? |
|
Ping from triage @onur! This PR needs your review. |
|
Ping from triage @rust-lang/rustdoc. It looks like @onur is unresponsive here. Could you please make a decision on how to move forward with this PR? Otherwise I'll close this, given that it has been blocked for over a month now, as per our triage guidelines. |
|
This has been done specifically for |
|
Ping from triage @onur! This PR needs your review. |
|
Time to get it in. @bors: r+ |
|
📌 Commit fcb54f6 has been approved by |
|
⌛ Testing commit fcb54f6 with merge 2366eda5a0c0a960fe94ad5afc7a9197bef04852... |
|
💔 Test failed - status-travis |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
rustdoc: add flag to control the html_root_url of dependencies The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows: Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired. Fixes #19603
|
☀️ Test successful - status-appveyor, status-travis |
The
--extern-html-root-urlflag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows:Calling rustdoc with
--extern-html-root-url crate=https://some-url.comwill cause rustdoc to override links that point to that crate to instead be replaced with a link rooted athttps://some-url.com/. (e.g. for docs.rs this would behttps://docs.rs/crate/0.1.0or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired.Fixes #19603