You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
I'm doing a bit of work integrating the lazySizes responsive image plugin into my jekyll site initially setup with this great generator.
To do this, I need to do a bit of string manipulation on image paths, to add in a {width} variable into the path. This works great on build, when viewing the production site from the /dist dir. However this breaks the paths when just using grunt serve which still references assets from the app dir. I'd rather not build all these images constantly just for dev, so the ability to toggle this via a flag would be ideal.
Is there a way I can get a flag into a liquid template, so jekyll would be aware of its environment, building a production build or not, and I can use this to alter the path to the image accordingly? or should I be looking to try and solve this in grunt?
Any suggestions appreciated, cheers!
The text was updated successfully, but these errors were encountered:
oller
changed the title
Flag for app/dist available in template?
Liquid template flag available for app/dist (dev/production) build?
Jun 15, 2015
Hi there,
I'm doing a bit of work integrating the lazySizes responsive image plugin into my jekyll site initially setup with this great generator.
To do this, I need to do a bit of string manipulation on image paths, to add in a
{width}
variable into the path. This works great on build, when viewing the production site from the/dist
dir. However this breaks the paths when just usinggrunt serve
which still references assets from theapp
dir. I'd rather not build all these images constantly just for dev, so the ability to toggle this via a flag would be ideal.Is there a way I can get a flag into a liquid template, so jekyll would be aware of its environment, building a production build or not, and I can use this to alter the path to the image accordingly? or should I be looking to try and solve this in grunt?
Any suggestions appreciated, cheers!
The text was updated successfully, but these errors were encountered: