nhoizey / jekyll-cloudinary

Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
https://nhoizey.github.io/jekyll-cloudinary/
MIT License
90 stars 18 forks source link

`baseurl` not added to asset fetch URLs #10

Closed eeeps closed 8 years ago

eeeps commented 8 years ago

In my first attempt to set up a test page for this plugin, I tried to do it in a subfolder of my current website. So I put this in my _config.yml

baseurl: "/etc/testing-jekyll-cloudinary" # the subpath of your site, e.g. /blog
url: "http://ericportis.com" # the base hostname & protocol for your site

When I built, the plugin turned this tag:

{% cloudinary /assets/test.png alt="beautiful!" %}

into Cloudinary fetch URLs that looked like this:

https://res.cloudinary.com/eric-cloudinary/image/fetch/c_scale,w_1386,q_auto,f_auto/http://ericportis.com/assets/test.png

But the image didn’t live at http://ericportis.com/assets/test.png, it was at http://ericportis.com/etc/testing-jekyll-cloudinary/assets/test.png

Can/should the baseurl be added between the “ericportis.com” and the ”/assets”, there? Without it, I couldn't figure out a way to make this plugin work on a site in a subfolder.

nhoizey commented 8 years ago

You're right, I should add baseurl

nhoizey commented 8 years ago

Fixed