Not able to get it to work
arunc opened this issue · comments
I am not able to get this plugin to work. Basically it doesn't change the src attribute of the img tag when you run JEKYLL_ENV=production jekyll build --watch.
Hi @arunc,
Sorry to hear you're having trouble getting this to work. Can you paste in your _config.yml
with the secure url token redacted, paste in what version of Ruby and Jekyll you're using, and paste in an example of an <img>
tag? That should help us further deduce the issue here.
No worries @kellysutton.
Jekyll version: jekyll (3.0.2)
Ruby version: 2.2.2
Here's my _config.yml
name:
description:
url:
Markdown
markdown: kramdown
highlighter: true
Permalinks
permalink: pretty
Assets
assets:
compress:
css: true
js: true
cache:
sources:
- _assets/scss
- _assets/js
cachebust: hard
imgix
imgix:
source: arunc.imgix.net
include
include: ['.nojekyll']
exclude
exclude: [node_modules, gulpfile.js]
--------------------------------------------- < img> -----------------------------------
img src={{ "/ngp/Showmethenumbers_error.jpg" | imgix_url }}
Hey @arunc. I took a peek at this, and it looks like there might be some issues with jekyll-imgix and "global" gem installations. I'm going to get that fixed up and better-documented next week, but I'd actually recommend using a "local" Jekyll setup. This will allow you to easily use different versions of Jekyll for each site as necessary, and just generally makes things more "best practices Ruby" style. To get started, you should just be able to create this Gemfile in your project's root directory:
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-imgix'
end
After you're set there, run bundle install
, and use bundle exec jekyll
commands instead (e.g., JEKYLL_ENV=production bundle exec jekyll build
). This will then run using the Jekyll installed by the Gemfile.
@paulstraw Sounds good. Thanks for the info. I've changed my plugins to be reflective of that structure
Let me know if you need anymore details, to solve this issue.
I updated the installation instructions in 018fba6 to use a more Jekyll-like installation method.