-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
showcase metatag images size fix [#14469] #14560
Conversation
The linting failed in windows. I will try with Ubuntu |
6a41700
to
2669dfa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
CC @fk |
@@ -255,15 +256,13 @@ const ShowcaseDetails = ({ parent, data, isModal, categories }) => ( | |||
<meta | |||
property="og:image" | |||
content={`https://www.gatsbyjs.org${ | |||
data.sitesYaml.childScreenshot.screenshotFile | |||
.childImageSharp.resize.src | |||
data.sitesYaml.childScreenshot.screenshotFile.publicURL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abhijithvijayan! Thanks for the PR! 🤗
I just gave this a spin, and publicURL
here will always be undefined
, unfortunately. :(
This is because data.sitesYaml
is coming in from https://github.com/gatsbyjs/gatsby/blob/master/www/src/templates/template-showcase-details.js#L96-L130. You added publicURL
to the StaticQuery
that takes care of pulling in the screenshot thumbnails for the previous and next navigation shown (only) in the "showcase site" modal.
We were misleading you in https://github.com/gatsbyjs/gatsby/issues/14469#issuecomment-499029287—apologies for that!
Since I'm at it, I'll take the liberty and push a fix so we can get this merged!
If I was unclear in explaining why this doesn't work as you expected it, maybe my follow-up commits will help; if you have any questions, don't hesitate to ask! And please 🙏 don't let this discourage you from contributing! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank You
…following what we do for starter detail pages (e.g. `/starters/gatsbyjs/gatsby-starter-blog/`)
This
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @abhijithvijayan and @fk 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @abhijithvijayan and @fk 🥇
Holy buckets, @abhijithvijayan — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
* showcase metatag images size fix [gatsbyjs#14469] * Rm `publicURL` from static query * Pull resized image * Don't create a square thumbnail, but a 1.91:1 landscape crop * Tell Twitter to use the `summary_large_image` format * Provide correct dimensions (`og:image:width/height`) * Add `og:title`, adjust `<title>`… …following what we do for starter detail pages (e.g. `/starters/gatsbyjs/gatsby-starter-blog/`)
* showcase metatag images size fix [gatsbyjs#14469] * Rm `publicURL` from static query * Pull resized image * Don't create a square thumbnail, but a 1.91:1 landscape crop * Tell Twitter to use the `summary_large_image` format * Provide correct dimensions (`og:image:width/height`) * Add `og:title`, adjust `<title>`… …following what we do for starter detail pages (e.g. `/starters/gatsbyjs/gatsby-starter-blog/`)
Description
Replaced the meta tag with the publicURL for the showcase images as the current images
(eg: https://www.gatsbyjs.org/static/cbaf442ed29638ce3775856ede4ac483/d808c/8990f01f5a6d31fce109c16ab078b499.jpg) are cropped improperly.
Related Issues
Fixes #14469