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

Highlight crate links as normal links with --enable-index-page #75823

Closed
camelid opened this issue Aug 23, 2020 · 9 comments · Fixed by #75842
Closed

Highlight crate links as normal links with --enable-index-page #75823

camelid opened this issue Aug 23, 2020 · 9 comments · Fixed by #75842
Assignees
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Aug 23, 2020

Rustdoc highlights most links in blue, for example module links:

image

But it does not highlight the links on the docs index page:

image

Generally links are highlighted in blue (or some other color) on websites and the rest of Rustdoc highlights links so it would be more consistent to highlight these links.

@camelid
Copy link
Member Author

camelid commented Aug 23, 2020

@rustbot modify labels: C-bug C-enhancement T-rustdoc

@rustbot rustbot added C-bug Category: This is a bug. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 23, 2020
@pickfire
Copy link
Contributor

Where did you find that link?

@camelid
Copy link
Member Author

camelid commented Aug 23, 2020

@camelid
Copy link
Member Author

camelid commented Aug 23, 2020

@jyn514 Do you know how to get to the index page (https://doc.rust-lang.org/nightly/nightly-rustc/) with docs for other crates? I can't seem to find the "List of all crates" in docs for other projects.

@jyn514
Copy link
Member

jyn514 commented Aug 23, 2020

I don't think this is actually generated by rustdoc. This looks like bootstrap is passing --index-page.

@jyn514
Copy link
Member

jyn514 commented Aug 23, 2020

In which case this should be a feature request for bootstrap, not a bug report for rustdoc.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 23, 2020
@jyn514 jyn514 changed the title Highlight crate links in docs index page as normal links Highlight crate links in rustc-nightly index page as normal links Aug 23, 2020
@camelid
Copy link
Member Author

camelid commented Aug 23, 2020

Hmm, but it's generated by Rustdoc here:

let content = format!(
"<h1 class='fqn'>\
<span class='in-band'>List of all crates</span>\
</h1><ul class='mod'>{}</ul>",
krates
.iter()
.map(|s| {
format!("<li><a href=\"{}index.html\">{}</li>", ensure_trailing_slash(s), s)
})
.collect::<String>()
);

@jyn514
Copy link
Member

jyn514 commented Aug 23, 2020

Oh interesting. It's still not on by default, you need to pass --enable-index-page, but it's definitely a rustdoc issue.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 23, 2020
@camelid
Copy link
Member Author

camelid commented Aug 23, 2020

@rustbot claim

@jyn514 jyn514 changed the title Highlight crate links in rustc-nightly index page as normal links Highlight crate links as normal links with --enable-index-page Aug 23, 2020
@bors bors closed this as completed in 18b0585 Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants