Skip to content

Commit 9321249

Browse files
committed
Use larger size image for SEO purposes
1 parent 9a04b8d commit 9321249

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

gatsby-wordpress-theme-libre/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@draftbox-co/gatsby-wordpress-theme-libre",
3-
"version": "1.0.33",
3+
"version": "1.0.34",
44
"license": "MIT",
55
"resolutions": {
66
"sharp": "0.23.4"

gatsby-wordpress-theme-libre/src/components/meta/article-meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const ArticleMeta = ({ data, amp, location }) => {
5050
const baseUrl = queryData.site.siteMetadata.siteUrl;
5151
const canonicalUrl = url.resolve(baseUrl, location.pathname);
5252

53-
const feature_image = data.featured_media?.localFile?.publicURL;
53+
const feature_image = data.featured_media?.localFile?.seo?.fixed.src;
5454

5555
const config = queryData.site.siteMetadata;
5656

gatsby-wordpress-theme-libre/src/components/post-card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const PostCard = ({ index, node }) => {
1515
<header className="entry-header">
1616
<h2 className="entry-title">
1717
<Link
18-
to={`/${node.slug}`}
18+
to={`${node.slug}`}
1919
dangerouslySetInnerHTML={{ __html: node.title }}
2020
></Link>
2121
</h2>
@@ -46,7 +46,7 @@ const PostCard = ({ index, node }) => {
4646
aria-hidden="true"
4747
aria-label={node.featured_media.title}
4848
title={node.featured_media.title}
49-
to={`/${node.slug}`}
49+
to={`${node.slug}`}
5050
className="no-line"
5151
>
5252
{node.featured_media.localFile.childImageSharp &&

gatsby-wordpress-theme-libre/src/utils/fragments.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export const wordPressPostData = graphql`
3131
src
3232
}
3333
}
34+
seo: childImageSharp {
35+
fixed(width: 1200, quality: 100) {
36+
src
37+
}
38+
}
3439
publicURL
3540
}
3641
alt_text
@@ -81,6 +86,11 @@ export const wordpressPageData = graphql`
8186
...GatsbyImageSharpFluid
8287
}
8388
}
89+
seo: childImageSharp {
90+
fixed(width: 1200, quality: 100) {
91+
src
92+
}
93+
}
8494
}
8595
}
8696
author {

0 commit comments

Comments
 (0)