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

Wrong path #2

Closed
JPeer264 opened this issue Aug 4, 2019 · 2 comments

Comments

@JPeer264
Copy link

commented Aug 4, 2019

I have following meta tags:

<!-- INPUT -->
<meta property="og:image" content="./img/og_img.png">
<meta property="og:url" content="https://mywebsite.io/someurl">

My --public-path in parcel is also just ./ which means the image should come from /someurl, instead, /someurl will get removed so the output looks like following:

<!-- OUTPUT  -->
<meta property="og:image" content="https://mywebsite.io/og_img.123.png">
<meta property="og:url" content="https://mywebsite.io/someurl">

<!-- EXPECTED OUTPUT  -->
<meta property="og:image" content="https://mywebsite.io/someurl/og_img.123.png">
<meta property="og:url" content="https://mywebsite.io/someurl">
@lukechilds

This comment has been minimized.

Copy link
Owner

commented Aug 6, 2019

Thanks for reporting. I'm using url.resolve to concat the base url with the image file url. Not too sure why that isn't correctly resolving the relative link.

const absoluteOgImageUrl = url.resolve(ogUrlContent, ogImageContent);

I don't really have time to look into this but if you want to work on it I'd happily accept a PR.

@JPeer264

This comment has been minimized.

Copy link
Author

commented Aug 15, 2019

Seems like the bug was not in this lib. The image actually did not got resolved correctly and was not originally without the public url. That caused the error.

@JPeer264 JPeer264 closed this Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.