-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Provide a way to change path of common css/js paths in documentations #48094
Comments
The alternative with
|
How about we add a hook for the entire |
It could as well. I don't have preference in here. |
Another idea: |
The best option for the moment seems to be the one proposed by @QuietMisdreavus. We just need confirmation from @onur now. |
@GuillaumeGomez |
Then I'll implement @QuietMisdreavus' solution. |
#48511 fixed this issue |
I am asking this for docs.rs.
Currently docs.rs is leveraging browser cache by serving every common css/js file ("rustdoc.css", "main.css", "main.js", "normalize.css", "*.woff"]) from root of the docs.rs. Otherwise docs.rs would serve 60k different copies of this files since rustdoc is generating them for each crate. Docs.rs is only replacing this file paths in documentations to provide a better/faster browsing experience.
But unfortunately new theme picker did break this feature and causing me some trouble to update rustc on docs.rs since it's not compatible.
I did a small talk with @GuillaumeGomez (the guy behind theme picker). He came up with an idea of adding a
--replace
or--url
argument to rustdoc so this files can be served from a desired path. For example runningrustdoc lib.rs --url main.css /main-1.24.css --url light.css /light-1.24.css
will replace this paths for the main.css and light.css.This will make new theme picker compatible with docs.rs and also it will dramatically improve docs.rs by removing only necessary documentation change made by docs.rs.
The text was updated successfully, but these errors were encountered: