jekyll-assets
jekyll-assets copied to clipboard
SASS is not compiled upon image updates
- [x] I tried updating to the latest version
- [ ] I can't, there is an issue
- [ ] This is about an < latest
- [ ] I understand older versions may be unsupported
- [ ] I Am on Windows
- [ ] Ubuntu Bash on Windows
- [ ] Fedora Bash on Windows
- [ ] Other Bash on Windows
- [ ] I Am on Linux
- [ ] Ubuntu
- [ ] Fedora
- [ ] CentOS
- [ ] Redhat
- [ ] Debian
- [ ] I am on macOS 10.13
- [x] I am on macOS 10.14
- [ ] I'm on Docker
- [ ] I understand Docker may be unsupported
Description
SASS is not compiled upon image updates background: asset-url('some-img.png')
. you have to make a change in the SASS file to get a compile trigger.
Steps
- Step 1 save an image to the asset folder
- Step 2
link that image in the sass with
asset-url('some-img.png')
- Step 3 after the sass is compiled, replace/update the image
Output
no errors here
Expected
nothing happens, but it should update the image in the css and browser.
This is very much intended behavior. Why should the SASS be recompiled, and updated because an image is updated... they are two independent sources?
@envygeeks right, this should have been a "Feature Request". I've started to report this issue because i get in state where my background image completely disappears after i've updated it, and no matter how often i recompile sass it wont comeback. Only server restart helps. I cant not reliably reproduce this issue, so i ended up writing about the default behavior.
You should be using Sprockets depend_on to achieve what you want https://github.com/rails/sprockets#depend_on. That's not to say I won't consider doing this on your behalf in the future, but the reality is, we know very little about your assets other than what you tell us, and tell us through Sprockets.
@envygeeks thanks, now i just need this depend_on
to accept directories (like link_tree
does) or jekyll-assets to add every asset that I link with asset-url
to that graph automatically. otherwise its too much manual work.
We don't link assets, that would be up to Sprockets mostly.