Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asset hash #14

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Support asset hash #14

wants to merge 10 commits into from

Conversation

ngs
Copy link
Owner

@ngs ngs commented Jun 2, 2020

Fixes #6

@tisba
Copy link

tisba commented Jun 3, 2020

This looks great! I've just checked this against our website and it works as expected.

@tisba
Copy link

tisba commented Jun 3, 2020

I just realised, that this does not seem to work with assets outside of the image path. That might be our fault, but the asset digest logic works fine... Need to take another look.

@tisba
Copy link

tisba commented Jun 3, 2020

I'm trying to wrap my head around another change: I also noticed that you've dropped base_url. Is there a way to ensure that attributes like og:url and og:image are full, absolute URLs now?

Reading https://ogp.me it looks like og:url needs to be URL and cannot be a path 🤔

@ngs
Copy link
Owner Author

ngs commented Jun 3, 2020

Currently I'm mis-using http_prefix so will recover base_url.

@tisba
Copy link

tisba commented Jun 3, 2020

For images actually, one can set activate :asset_host, host: "https://example.com" and this branch will do the right thing for the image. But that does not seem to work for og:url.

@ngs ngs marked this pull request as ready for review June 4, 2020 00:00
@tisba
Copy link

tisba commented Jun 4, 2020

I'm not that familiar with middleman internals, but it looks like Middleman::Util.url_for(app, obj) takes an option called relative. Maybe this can be used somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using og:image filenames from middleman's :asset_hash extension
2 participants