Skip to content

Commit cdecf60

Browse files
committed
Update html.js
1 parent a4c1522 commit cdecf60

File tree

4 files changed

+45
-14
lines changed

4 files changed

+45
-14
lines changed

src/components/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ function Layout({ pageTitle, children }: { pageTitle?: string; children: ReactNo
4848

4949
return (
5050
<Container $isMain={!pageTitle}>
51+
<script
52+
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5121982141414734'
53+
crossOrigin='anonymous'
54+
async
55+
></script>
5156
<GlobalStyle />
5257
<title>
5358
{data.site.siteMetadata.title}

src/components/seo.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,14 @@ const SEO = ({ description = '', title, slug }: SeoProps) => {
3333
title={title}
3434
titleTemplate={defaultTitle ? `%s | ${defaultTitle}` : null}
3535
>
36-
<meta name='theme-color' content='#1a5b89' />
3736
<meta property='og:title' content={title || defaultTitle} />
38-
<meta property='og:type' content={'website'} />
3937
<meta property='og:image' content={`https://pyjun01.github.io/${slug}-preview.png`} />
4038
<meta property='og:url' content={`https://pyjun01.github.io/v/${slug}`} />
4139
<meta property='og:description' content={metaDescription} />
42-
<meta property='og:site_name' content={'pyjun01 blog'} />
43-
<meta property='og:locale' content={'ko_KR'} />
4440
<meta name='description' content={metaDescription} />
4541
<meta name='twitter:card' content={'summary'} />
4642
<meta name='twitter:title' content={title} />
4743
<meta name='twitter:description' content={metaDescription} />
48-
<meta name='naver-site-verification' content='2a28f13354877854bb05feb3be7bf8f34ff88f05' />
4944
</Helmet>
5045
);
5146
};

src/html.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
4+
export default function HTML(props) {
5+
return (
6+
<html {...props.htmlAttributes}>
7+
<head>
8+
<meta charSet='utf-8' />
9+
<meta httpEquiv='x-ua-compatible' content='ie=edge' />
10+
<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no' />
11+
<meta property='og:type' content='website' />
12+
<meta property='og:site_name' content='pyjun01 blog' />
13+
<meta property='og:locale' content='ko_KR' />
14+
<meta name='theme-color' content='#1a5b89' />
15+
<meta name='naver-site-verification' content='2a28f13354877854bb05feb3be7bf8f34ff88f05' />
16+
<script
17+
async
18+
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5121982141414734'
19+
crossorigin='anonymous'
20+
></script>
21+
{props.headComponents}
22+
</head>
23+
<body {...props.bodyAttributes}>
24+
{props.preBodyComponents}
25+
<div key={`body`} id='___gatsby' dangerouslySetInnerHTML={{ __html: props.body }} />
26+
{props.postBodyComponents}
27+
</body>
28+
</html>
29+
);
30+
}
31+
32+
HTML.propTypes = {
33+
htmlAttributes: PropTypes.object,
34+
headComponents: PropTypes.array,
35+
bodyAttributes: PropTypes.object,
36+
preBodyComponents: PropTypes.array,
37+
body: PropTypes.string,
38+
postBodyComponents: PropTypes.array,
39+
};

src/pages/v/index.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ function BlogPage() {
1515
}}
1616
title='pyjun01 개발 블로그'
1717
>
18-
<meta name='theme-color' content='#1a5b89' />
19-
<meta name='description' content='pyjun01 개발 블로그' />
20-
<meta name='keywords' content='pyjun01,개발,개발자,개발 블로그' />
21-
<meta name='naver-site-verification' content='2a28f13354877854bb05feb3be7bf8f34ff88f05' />
22-
<meta name='theme-color' content='#1a5b89' />
2318
<meta property='og:title' content='pyjun01 개발 블로그' />
24-
<meta property='og:type' content='website' />
2519
<meta property='og:url' content='https://pyjun01.github.io' />
2620
<meta property='og:description' content='pyjun01의 개발 블로그입니다' />
27-
<meta property='og:site_name' content='pyjun01 blog' />
28-
<meta property='og:locale' content='ko_KR' />
2921
<meta name='description' content='pyjun01의 개발 블로그입니다' />
22+
<meta name='keywords' content='pyjun01,개발,개발자,개발 블로그' />
3023
<meta name='twitter:card' content={'summary'} />
3124
<meta name='twitter:title' content='pyjun01 개발 블로그' />
3225
<meta name='twitter:description' content='pyjun01의 개발 블로그입니다' />
33-
<meta name='naver-site-verification' content='2a28f13354877854bb05feb3be7bf8f34ff88f05' />
3426
</Helmet>
3527
<List nodes={data.allMdx.nodes} />
3628
</Layout>

0 commit comments

Comments
 (0)