tiste / middleman-meta-tags

Easy integration of meta tags into your Middleman applications
rubygems.org/gems/middleman-meta-tags
MIT License
65 stars 19 forks source link

Calculate pull_image path with image_path #11

Closed rossta closed 7 years ago

rossta commented 8 years ago

This patch allows you to specify pull image source as you would an argument to the image_path helper. In other words, any asset configuration (asset hashing, asset host, cache busting, etc) in your stack will be applied to the output.

So, in yml instead of

pull_image: 'http://example.com/assets/my/image.jpg

you may do:

pull_image: 'my/image.jpg

Either approach will work as expected, so backwards compatibility is maintained.

To make this work, a new :host option should be provided in site.yml.

# site.yml
site: 'My blog'
host: 'https://rossta.net'
pull_image: 'icon-ruby.png'
# ...
tiste commented 8 years ago

Great feature, thanks @rossta! Could you just please update the README.md?

rossta commented 8 years ago

@tiste Thanks! Addressed your comments.

rossta commented 8 years ago

@tiste Let me know if I can do anything else to help move this PR forward.

tiste commented 8 years ago

@rossta oops I'll check soon, sorry for that :)

rossta commented 7 years ago

@tiste Any chance this PR could get merged? Thanks!

flexbox commented 7 years ago

@tiste Agreed !