Skip to content

Commit

Permalink
fix: og-image 교체
Browse files Browse the repository at this point in the history
  • Loading branch information
hjy0951 committed Apr 22, 2024
1 parent f61fd6b commit 41f38a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Binary file modified public/og-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/components/SEO/SEO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,32 @@ interface Props {
* @default 추가 필요
*/
image?: string;
/**
* `og:image`, `twitter:image`의 크기를 지정하는데 사용됩니다.
*
* @default 1300px
*/
width?: string;
/**
* `og:image`, `twitter:image`의 크기를 지정하는데 사용됩니다.
*
* @default 650px
*/
height?: string;
}

const DEFAULT_TITLE = '디프만 - Depromeet';
const DEFAULT_DESCRIPTION = '오직 디자이너와 프로그래머의 동반성장을 위해서';
const DEFAULT_IMAGE = '/og-main.png';
const DEFAULT_WIDTH = '1300';
const DEFAULT_HEIGHT = '650';

export const SEO = ({
title = DEFAULT_TITLE,
description = DEFAULT_DESCRIPTION,
image = DEFAULT_IMAGE,
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
}: Props) => {
return (
<Head>
Expand All @@ -38,6 +54,8 @@ export const SEO = ({
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
<meta property="og:image:width" content={width} />
<meta property="og:image:height" content={height} />

<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
Expand Down

0 comments on commit 41f38a4

Please sign in to comment.