Skip to content

Commit

Permalink
fix(website): og image tag, add author (#6979)
Browse files Browse the repository at this point in the history
* feat: replace twiiter image with image

- set post image as og:image
- remove image on posts where it is not needed

* fix(website): og image tag, add author
  • Loading branch information
martinjagodic authored Nov 16, 2023
1 parent fe4399e commit 672fbfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Layout({ hasPageHero, children }) {
>
<Helmet defaultTitle={title} titleTemplate={`%s | ${title}`}>
<meta name="description" content={description} />
<meta name="og:image" content="https://decapcms.org/img/og-image.jpg" />
<meta name="image" property="og:image" content="https://decapcms.org/img/og-image.jpg" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,700,900|Roboto+Mono:400,700"
Expand Down
3 changes: 2 additions & 1 deletion website/src/templates/blog-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function BlogPost({ data }) {
<Helmet>
<title>{title}</title>
{desc && <meta name="description" content={desc} />}
{image && <meta name="og:image" content={imageUrl} />}
{image && <meta name="image" property="og:image" content={imageUrl} />}
{author && <meta name="author" content={author} />}
{canonical_url && <link rel="canonical" href={canonical_url} />}
</Helmet>
<TwitterMeta title={title} description={desc} image={imageUrl} />
Expand Down

0 comments on commit 672fbfe

Please sign in to comment.