I'm struggling to overcome a strange behavior with Jekyll-Assets when exporting all assets correctly on build command.
The configuration is set to use cachebusting with "file system" cache type. When building we get all images and fonts correctly. But on one of the scss files it seems that fonts and images are exported randomly (sometimes yes, other times no). When files are not exported the path written in css is correct, containing the hash for the cachebust.
While trying to debug with deleting .assets-cache and _site/ folder I've notice the random gets even much more frequent.
This is the configuration
Dev environment(Docker Container):
version: '3'
services:
jekyll:
build: .
command: jekyll build --watch --incremental
volumes:
- .:/usr/src/app
nginx:
image: nginx:stable-alpine
volumes:
- ./_site:/usr/share/nginx/html
ports:
- 8080:80
depends_on:
- jekyll
Dev environment(Dockerfile):
FROM ruby:2.4.1-stretch
RUN apt-get update -qq && \
apt-get install -y build-essential
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ADD Gemfile /usr/src/app
ADD Gemfile.lock /usr/src/app
RUN gem install bundle && \
bundle && \
bundle install
Jekyll configuration(Gemfile):
gem "jekyll", "3.5.1"
group :jekyll_plugins do
# gem "html-proofer"
#gem "jekyll-redirect-from"
gem "jekyll-assets"
gem "coffee-script"
gem "uglifier"
gem "sass"
gem "therubyracer"
gem "less"
gem "jekyll-feed"
gem "jekyll-paginate-v2"
gem "jekyll-last-modified-at"
gem "jekyll-sitemap"
gem "jekyll-minifier"
end
Project configuration (_config.yml):
assets:
digest: true
compress:
css: true
js: uglifier
autoprefixer:
browsers:
- "> 1%"
- "last 3 versions"
- "IE > 9"
prefix: "/assets"
sources:
- _assets/
- _assets/js
- _assets/css
- _assets/javascript
- _assets/stylesheets
- _assets/img
- _assets/fonts