-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(html): cache bust static files by adding hashes to file names #1368
Conversation
e0d5f2e
to
9c07413
Compare
Thanks! Can you provide an overview on how this works? The documentation will also need to be updated. |
I've added documentation for the new config option and handlebars helper. Is there any other particular thing that's confusing? |
9dd01f4
to
f0727d0
Compare
And fixed a Windows-specific bug in the test code. |
Is this change okay? Is there some documentation that it still needs? |
Thank you for the great patch! @notriddle |
would be really cool if this feature made it into MdBook |
15b73f6
to
de1dd2d
Compare
Okay, I've rebased this onto mainline again. I've also added support for cache-busting the toc.js file. |
de1dd2d
to
8794494
Compare
We don't want to be writing to arbitrary directories, and this seems to make the test a little simpler.
Thanks! I pushed a few small changes. I noticed that the paths for the no-js toc seem to be broken. Do these paths need to be updated? Would it be possible to update the sidebar-nojs.goml test to verify those are loading? |
To make this work, I need to break the circular dependency and stop hashing toc.html itself.
Yes, they do need updated. I've pushed another commit that fixes this problem, and that enables hashed files in the GUI test, so it now covers this case. |
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.
Thanks!
Currently, some parts of the [website](https://rust-lang.github.io/rust-clippy/master/index.html)'s CSS are not being applied. This seems to be due to a broken link to the originally referenced CSS. I suspect rust-lang/mdBook#1368. changelog: none
Closes #1254
Fixes #2547