Skip to content

Commit

Permalink
fix : og img 태그 경로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepdog13 committed Mar 1, 2024
1 parent 7da3cd1 commit 5b1a74b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -18,7 +17,6 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
9 changes: 7 additions & 2 deletions client/src/components/common/MetaTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function MetaTag(props) {
return type === "home" ? (
<Helmet>
<title>sheepdog13blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="자바스크립트를 주로 다루는 기술 블로그입니다."
Expand All @@ -18,19 +19,23 @@ function MetaTag(props) {
property="og:description"
content="자바스크립트를 주로 다루는 기술 블로그입니다."
/>
<meta property="og:image" content="/img/bond.webp" />
<meta
property="og:image"
content="https://sheepdog13.blog/img/bond.webp"
/>
<meta property="og:url" content="https://sheepdog13.blog" />
</Helmet>
) : (
<Helmet>
<title>{title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content={desc} />
<meta name="keywords" content="post" />
<meta property="og:type" content="website" />
<meta property="og:title" content={title} />
<meta property="og:site_name" content={title} />
<meta property="og:description" content={desc} />
<meta property="og:image" content={`${img}`} />
<meta property="og:image" content={`https://sheepdog13.blog${img}`} />
<meta property="og:url" content={window.location.href} />
</Helmet>
);
Expand Down

0 comments on commit 5b1a74b

Please sign in to comment.