-
Notifications
You must be signed in to change notification settings - Fork 203
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
Improve the CSS situation in the repository #496
Conversation
The file was added to the css folder by mistake, it's supposed to be generated from templates/style.scss
They're not actually being used for the main website, and the crates built with that nightly will load their essential files anyway.
This commit removes the vendored CSS of Rustdoc 1.10.0-nightly, changing the site to always use the lastest Rustdoc's one. To do that, the Docker entrypoint is changed to add the essential files the first time the container is started, and the frontend now queries the database to see the version of the files to include. The version is cached by the first page loaded by users, and doesn't change unless the application is restarted. This is fine, since the application is restarted often enough and using a CSS older by a few nightlies is not so big of a deal. The cache also prevents response time regressions.
cc @GuillaumeGomez as well |
Can you also apply 60ded3b to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for the one comment about the entrypoint, I think it can be avoided by rearranging the logic a little.
Ported the configuration. |
ah wait I'm on the wrong git branch lol one sec |
Ok yeah this looks great! |
I'm not sure why it was disabled in the first place, but it started affecting users after rust-lang#496 was merged.
I'm not sure why it was disabled in the first place, but it started affecting users after #496 was merged.
This PR fixes some of the CSS mess contained in this repository:
css/style.css
, as it was just an out of date copy of the generatedtemplates/style.scss
. The file was actually never served to users, as the SCSS generated on the fly takes precedence.1.40.0-nightly
vendored CSS files, as they're not used by anything.1.10.0-nightly
vendored CSS files, and changed the application to use the latest nightly's essential files instead of the 1.10 ones. This required a change in the Docker entrypoint to load the essential files the first time the container is started, and a few tweaks to ourstyle.scss
to workaround the changes in Rustdoc's CSS since 1.10.css/
tostatic/
in the repository, as it now only containsfavicon.ico
.r? @jyn514