Skip to content

Commit

Permalink
adding openGraph image
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsbajorics committed Jun 15, 2021
1 parent 580da15 commit 7263f36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions website-next/components/header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react'
import Head from 'next/head'
import { srcToCdn } from './hosted-image'

export function Header() {
return (
Expand Down Expand Up @@ -66,12 +67,12 @@ export function Header() {
<link rel='mask-icon' href='/safari-pinned-tab.svg' color='#5bbad5' />

{/* OpenGraph tags */}
<meta property='og:title' content='Utopia:Design and Code on one platform' />
<meta property='og:title' content='Utopia: Design and Code on one platform' />
<meta
property='og:description'
content='Utopia is a production-grade online coding and design tool for React that reads and writes code you’ll want to commit.'
/>
<meta property='og:image' content='/utopia_og_preview_image@2x.png' />
<meta property='og:image' content={srcToCdn('/og-card.png')} />
<meta property='og:type' content='website' />
</Head>
)
Expand Down
2 changes: 1 addition & 1 deletion website-next/components/hosted-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'

const cdnUrl = process.env.UTOPIA_CDN_URL ?? ''

function srcToCdn(src: string): string {
export function srcToCdn(src: string): string {
return `${cdnUrl}${src}`
}

Expand Down
Binary file added website-next/public/og-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7263f36

Please sign in to comment.