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

Ship logo and favicon with docs, to make them self-contained #26075

Closed
SimonSapin opened this issue Jun 7, 2015 · 11 comments
Closed

Ship logo and favicon with docs, to make them self-contained #26075

SimonSapin opened this issue Jun 7, 2015 · 11 comments
Assignees
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

When looking at local docs shipped with my compiler in share/doc/rust/html, my browser makes requests to the internet:

These requests are sometimes slow, and seem to block rendering. These files should be shipped together with the docs so that rendering local docs is always fast.

CC @alexcrichton

@alexcrichton
Copy link
Member

Sounds like a fine idea to me.

@steveklabnik
Copy link
Member

@SimonSapin
Copy link
Contributor Author

Trying now with data URLs

@SimonSapin

This comment has been minimized.

@SimonSapin
Copy link
Contributor Author

Alternative idea: when the string’s value in #![doc(html_logo_url = "...")] is not an absolute URL (i.e. doesn’t match ^[a-zA-Z0-9+.-]+:), have rustdoc interpret it as a file name relative to the source file (like include_bin!), copy that file somewhere into target/doc/, and fix up the URL when it’s being used to have the right number of ../ components, like for main.css.

@alexcrichton
Copy link
Member

I think it'd be fine to just check in these assets and then have the build system ensure they move along to the right location, the crates could then just change the URL for the favicon/logo as they'll be hosted on doc.rust-lang.org

@llogiq
Copy link
Contributor

llogiq commented Sep 11, 2015

I think @SimonSapin is on the right track – perhaps it'd be good to have a %ROOT (or some such) wildcard that inserts the right number of "../" according to the current URL. Relative URLs will work even if the source files are moved around.

@steveklabnik
Copy link
Member

Triage: no change

@Mark-Simulacrum Mark-Simulacrum added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Jul 22, 2017
@GuillaumeGomez
Copy link
Member

I'll fix it.

@GuillaumeGomez GuillaumeGomez self-assigned this Oct 31, 2018
@dhardy dhardy mentioned this issue Jan 25, 2019
4 tasks
@GuillaumeGomez
Copy link
Member

Fixed by #57552.

@SimonSapin
Copy link
Contributor Author

And #58185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants