1
1
import React from 'react'
2
2
import PropTypes from 'prop-types'
3
- import Head from 'next/head'
4
3
import { useRouter } from 'next/router'
4
+ import { NextSeo } from 'next-seo'
5
5
6
6
const siteData = {
7
7
siteTitle : 'Smash Tier List' ,
@@ -15,32 +15,30 @@ const CommonMetaTags = ({ title, description: descriptionProp }) => {
15
15
const description = descriptionProp || siteData . metaDescription
16
16
17
17
return (
18
- < Head >
19
- < title > { title } </ title >
20
- < meta name = 'description' content = { description } />
21
-
22
- < meta property = 'og:title' content = { title } />
23
- < meta property = 'og:url' content = { `${ siteData . siteRoot } ${ pathname } ` } />
24
- < meta property = 'og:description' content = { description } />
25
- < meta property = 'og:type' content = 'website' />
26
- < meta property = 'og:image' content = { `${ siteData . siteRoot } /apple-touch-icon.png` } />
27
- < meta property = 'og:site_name' content = { siteData . siteTitle } />
28
-
29
- < meta name = 'twitter:title' content = { title } />
30
- < meta name = 'twitter:url' content = { `${ siteData . siteRoot } ${ pathname } ` } />
31
- < meta name = 'twitter:card' content = 'app' />
32
- < meta name = 'twitter:site' content = 'desko27' />
33
- < meta name = 'twitter:creator' content = 'desko27' />
34
- < meta name = 'twitter:description' content = { description } />
35
- < meta name = 'twitter:image' content = { `${ siteData . siteRoot } /apple-touch-icon.png` } />
36
-
37
- < link rel = 'apple-touch-icon' sizes = '180x180' href = '/apple-touch-icon.png' />
38
- < link rel = 'icon' type = 'image/png' sizes = '32x32' href = '/favicon-32x32.png' />
39
- < link rel = 'icon' type = 'image/png' sizes = '16x16' href = '/favicon-16x16.png' />
40
- < link rel = 'manifest' href = '/site.webmanifest' />
41
- < link rel = 'mask-icon' href = '/safari-pinned-tab.svg' color = '#5bbad5' />
42
- < meta name = 'msapplication-TileColor' content = '#da532c' />
43
- </ Head >
18
+ < >
19
+ < NextSeo
20
+ title = { title }
21
+ description = { description }
22
+ canonical = 'https://www.canonical.ie/'
23
+ openGraph = { {
24
+ url : `${ siteData . siteRoot } ${ pathname } ` ,
25
+ title,
26
+ description,
27
+ images : [ {
28
+ url : `${ siteData . siteRoot } /apple-touch-icon.png` ,
29
+ width : 180 ,
30
+ height : 180 ,
31
+ alt : siteData . siteTitle
32
+ } ] ,
33
+ site_name : siteData . siteTitle
34
+ } }
35
+ twitter = { {
36
+ handle : '@handle' ,
37
+ site : '@site' ,
38
+ cardType : 'summary_large_image'
39
+ } }
40
+ />
41
+ </ >
44
42
)
45
43
}
46
44
0 commit comments