Skip to content

Commit

Permalink
Fix: SEO에서 이미지 절대 경로 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimyouknow committed Feb 15, 2023
1 parent f0daf93 commit 17fdb75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blog-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
siteName: `Yunho.blog`,
author: 'Yunho(kimyouknow)',
description: `안녕하세요. 프론트엔드 개발자 김윤호입니다. 고민과 문제 해결 과정을 공유하고 있습니다.`,
siteUrl: 'https://kimyouknow.github.io/',
siteUrl: 'https://kimyouknow.github.io',
image: `static/profile-image.png`,
keywords: ['개발블로그', '문제해결', 'gatsby'],
favicon: 'static/pencil.png',
Expand Down
5 changes: 3 additions & 2 deletions src/components/SEO/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const SEO = ({
seo,
readingTime,
}: SEOConfigType) => {
const absoluteImagePath = `${siteUrl}/${image}`
return (
<Helmet htmlAttributes={{ lang }}>
<title>{title}</title>
Expand All @@ -30,7 +31,7 @@ const SEO = ({
<meta property="og:site_name" content={siteName} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={`${siteUrl}${image}`} />
<meta property="og:image" content={absoluteImagePath} />
<meta property="og:url" content={siteUrl} />
<meta property="og:locale" content="ko_KR" />
<meta property="og:locale:alternate" content="es_ES" />
Expand All @@ -39,7 +40,7 @@ const SEO = ({
<meta name="twitter:domain" content={siteUrl} />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={`${siteUrl}${image}`} />
<meta name="twitter:image" content={absoluteImagePath} />
<meta name="twitter:image:alt" content={description} />
<meta name="twitter:label1" content="Time to read" />
<meta name="twitter:data1" content={readingTime} />
Expand Down

0 comments on commit 17fdb75

Please sign in to comment.