File tree Expand file tree Collapse file tree 2 files changed +22
-25
lines changed
Expand file tree Collapse file tree 2 files changed +22
-25
lines changed Original file line number Diff line number Diff line change @@ -28,34 +28,9 @@ const Body = styled.div`
2828`
2929
3030const Layout = ( props : LayoutProps ) => {
31- const { t } = useTranslation ( )
32-
33- const title =
34- props . pageName !== ''
35- ? `${ t ( `pageTitle:${ props . pageName } ` ) } : ${ t ( `label:siteTitle` ) } `
36- : `${ t ( `label:siteTitle` ) } `
37-
38- const description = `${ t ( `label:pyconkrTitle` ) } : ${ t ( `label:pyconkrDate` ) } `
39-
4031 // TODO: locale을 context로 관리
4132 return (
4233 < >
43- < NextSeo
44- title = { title }
45- description = { description }
46- openGraph = { {
47- type : 'website' ,
48- url : 'https://pycon.kr' ,
49- title : title ,
50- site_name : title ,
51- description : description ,
52- images : [
53- {
54- url : `https://2022.pycon.kr/images/og-temp.jpg`
55- }
56- ]
57- } }
58- />
5934 < NavBarMobile locale = { props . locale } />
6035 < NavBar locale = { props . locale } />
6136 < Container >
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { I18nextProvider, useTranslation } from 'react-i18next'
77import { ThemeProvider } from 'styled-components'
88import '../assets/styles/global.css'
99import Theme from '../assets/styles/theme'
10+ import { NextSeo } from 'next-seo'
1011
1112const App = ( {
1213 Component,
@@ -17,11 +18,32 @@ const App = ({
1718 const { t } = useTranslation ( )
1819
1920 const pageName = pageProps ?. title ?? ''
21+ const pageTitle =
22+ pageName !== ''
23+ ? `${ t ( `pageTitle:${ pageName } ` ) } : ${ t ( `label:siteTitle` ) } `
24+ : `${ t ( `label:siteTitle` ) } `
25+ const description = `${ t ( `label:pyconkrTitle` ) } : ${ t ( `label:pyconkrDate` ) } `
2026
2127 return (
2228 < >
2329 < I18nextProvider i18n = { i18n } >
2430 < ThemeProvider theme = { Theme } >
31+ < NextSeo
32+ title = { pageTitle }
33+ description = { description }
34+ openGraph = { {
35+ type : 'website' ,
36+ url : 'https://pycon.kr' ,
37+ title : pageTitle ,
38+ site_name : pageTitle ,
39+ description : description ,
40+ images : [
41+ {
42+ url : `https://2022.pycon.kr/images/og-temp.jpg`
43+ }
44+ ]
45+ } }
46+ />
2547 < Layout locale = { locale } pageName = { pageName } >
2648 < Component pageName = { pageName } { ...pageProps } />
2749 </ Layout >
You can’t perform that action at this time.
0 commit comments