nanoc-cachebuster
nanoc-cachebuster copied to clipboard
Broken cache busting of relative CSS paths in HTML
Hi all, thanks for this gem
I've got a fixed that works well for me: https://github.com/ximus/nanoc-cachebuster/commit/54a1e6844accc0e3f83cda5d8d76803b6708ecac
I wanted to write a spec to test this thoughroughly but ... I wasn't able to run the project specs easily and I had to move one.
If you share with me how, I'm still willing to do it.
my problem case was the folllowing:
I had an HTML file at resume/index.html
with a link to a CSS file at ../stylesheets/resume.css
. The output CSS path ended up being stylesheets/resume-CACHEBUST.css
instead of ../stylesheets/resume-CACHEBUST.css
I'm not sure I understand exactly why this works. Wouldn't the same fix need to be applied to the following line also?
I don't really use or maintain this project anymore, but if you create a pull request I can have quick look.
yeah, sounds like it would.
After my problem was fixed I went to to run the specs in order to produce a proper patch. rspec .
failed, i poked around briefly but I couldn't the specs to run.
I didn't have the time or motivation to put more effort into it. Maybe I'll get back to it depending on my work load, no promises.