Pre-#44, it was possible to specify image: image.jpg in the front matter and the generated URL would be relative to the post, but now jekyll-seo emits https://:url/:baseurl/image.jpg, which does not exist. #76 improved things somewhat by reintroducing the ability to link off-site images, but it's still not possible to use post-relative paths.
This PR reintroduces that behaviour while maintaining support for paths relative to the site's baseurl when they are prefixed by "/", fixing #461.
My config uses
permalink: /post/:year/:title/
together withjekyll-postfiles
to keep assets local to their respective posts. This allows me to use simpler image tags in my Markdown (![…](image.jpg)
) when editing and as a consequence my post's images tend to be shipped tohttps://:url/post/:year/:title/image.jpg
.Pre-#44, it was possible to specify
image: image.jpg
in the front matter and the generated URL would be relative to the post, but nowjekyll-seo
emitshttps://:url/:baseurl/image.jpg
, which does not exist. #76 improved things somewhat by reintroducing the ability to link off-site images, but it's still not possible to use post-relative paths.This PR reintroduces that behaviour while maintaining support for paths relative to the site's
baseurl
when they are prefixed by"/"
, fixing #461.