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

Incorrect og:image tag is generated #104

Open
bminaiev opened this issue Dec 25, 2022 · 1 comment
Open

Incorrect og:image tag is generated #104

bminaiev opened this issue Dec 25, 2022 · 1 comment

Comments

@bminaiev
Copy link

og:image meta tag is used to generate cards for social media (twitter/facebook/...). Currently, it is generated by the jekyll-seo-tag plugin based on post:image.

The problem is jekyll-seo-tag expects the image path to be full, while Lagrange expects it relative to assets/img.

In the example page, there is an og:image tag:

<meta property="og:image" content="https://lenpaul.github.io/Lagrange/mountains.jpg" />

which contains an incorrect path. So if you share a link to this page on Twitter, the image is not shown.

@stfab
Copy link

stfab commented Apr 4, 2023

I had the same issue on my website. As a workaround, I removed the assets/img/ part from the image elements in _layouts/post.html and _layouts/home.html. And for all posts, I've added assets/img/ in front of the image path. This fixed the preview cards in social media for me.

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

No branches or pull requests

2 participants