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

showcase metatag images size fix [#14469] #14560

Merged
merged 7 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion www/src/components/showcase-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const ShowcaseDetails = ({ parent, data, isModal, categories }) => (
}}
>
<Helmet>
<title>{data.sitesYaml.title}</title>
<title>{data.sitesYaml.title}: Showcase | GatsbyJS</title>
<meta
property="og:image"
content={`https://www.gatsbyjs.org${
Expand All @@ -266,6 +266,25 @@ const ShowcaseDetails = ({ parent, data, isModal, categories }) => (
.childImageSharp.resize.src
}`}
/>
<meta name="twitter:card" content="summary_large_image" />
<meta
name="og:title"
value={`${data.sitesYaml.title}: Showcase | GatsbyJS`}
/>
<meta
property="og:image:width"
content={
data.sitesYaml.childScreenshot.screenshotFile
.childImageSharp.resize.width
}
/>
<meta
property="og:image:height"
content={
data.sitesYaml.childScreenshot.screenshotFile
.childImageSharp.resize.height
}
/>
</Helmet>
<div
css={{
Expand Down
9 changes: 3 additions & 6 deletions www/src/templates/template-showcase-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,10 @@ export const pageQuery = graphql`
fluid(maxWidth: 700) {
...GatsbyImageSharpFluid_noBase64
}
resize(
width: 1500
height: 1500
cropFocus: CENTER
toFormat: JPG
) {
resize(width: 1200, height: 627, cropFocus: NORTH, toFormat: JPG) {
src
height
width
}
}
}
Expand Down