jekyll / jekyll-seo-tag

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
https://jekyll.github.io/jekyll-seo-tag
MIT License
1.66k stars 294 forks source link

Support for image paths relative to the page's directory #466

Closed numist closed 2 years ago

numist commented 2 years ago

My config uses permalink: /post/:year/:title/ together with jekyll-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 to https://: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 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.

numist commented 2 years ago

oops sorry @indirect

numist commented 2 years ago

@mattr-: hope you had a good vacation, how do we feel about this?

mattr- commented 2 years ago

@jekyllbot: merge +minor