2022-05-16 14:25:22 +02:00
|
|
|
import Head from 'next/head'
|
2023-02-10 13:18:30 +01:00
|
|
|
import type { SEODefaultValues } from 'types/config'
|
2023-02-10 12:42:05 +01:00
|
|
|
import { SEOConfig } from 'utils/config'
|
2022-05-16 14:25:22 +02:00
|
|
|
|
2023-02-10 12:42:05 +01:00
|
|
|
const NextHead: React.FC<SEODefaultValues> = ({
|
|
|
|
shortName = SEOConfig.shortName,
|
|
|
|
longName = SEOConfig.longName,
|
|
|
|
color = SEOConfig.color,
|
|
|
|
defaultLocale = SEOConfig.defaultLocale,
|
|
|
|
description = SEOConfig.description,
|
|
|
|
icons = SEOConfig.icons,
|
|
|
|
url = SEOConfig.url
|
|
|
|
}) => {
|
2022-03-24 15:00:14 +01:00
|
|
|
return (
|
|
|
|
<Head>
|
2023-02-10 12:42:05 +01:00
|
|
|
<title>{shortName}</title>
|
2022-03-24 15:00:14 +01:00
|
|
|
|
2023-02-10 12:42:05 +01:00
|
|
|
<link rel='shortcut icon' href={icons?.default} type='image/x-icon' />
|
|
|
|
<link rel='apple-touch-icon' sizes='180x180' href={icons?.apple} />
|
|
|
|
<link rel='icon' type='image/png' sizes='16x16' href={icons?.['16_16']} />
|
|
|
|
<link rel='icon' type='image/png' sizes='32x32' href={icons?.['32_32']} />
|
2022-03-24 15:00:14 +01:00
|
|
|
|
|
|
|
{/* Default meta tags */}
|
|
|
|
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta charSet='UTF-8' />
|
|
|
|
<meta httpEquiv='X-UA-Compatible' content='IE=edge' />
|
2022-05-16 14:25:22 +02:00
|
|
|
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta name='description' content={description} />
|
|
|
|
<meta name='language' content={defaultLocale} />
|
|
|
|
<meta name='theme-color' content={color} />
|
|
|
|
<meta name='copyright' content={shortName} />
|
|
|
|
<meta name='author' content={shortName} />
|
|
|
|
<meta name='publisher' content={shortName} />
|
2022-03-24 15:00:14 +01:00
|
|
|
<meta name='robots' content='index, follow' />
|
|
|
|
<meta name='rating' content='general' />
|
|
|
|
<meta name='distribution' content='global' />
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta name='msapplication-TileColor' content={color} />
|
2022-03-24 15:00:14 +01:00
|
|
|
|
|
|
|
{/* Open graph MT */}
|
|
|
|
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta property='og:title' content={shortName} />
|
2022-03-24 15:00:14 +01:00
|
|
|
<meta property='og:type' content='website' />
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta property='og:url' content={url} />
|
|
|
|
<meta property='og:image' content={icons?.image} />
|
|
|
|
<meta property='og:description' content={description} />
|
2022-05-16 14:25:22 +02:00
|
|
|
<meta
|
|
|
|
property='og:locale'
|
2023-02-10 12:42:05 +01:00
|
|
|
content={SEOConfig.defaultLocale?.concat(
|
|
|
|
'_',
|
|
|
|
SEOConfig.defaultLocale.toUpperCase()
|
|
|
|
)}
|
2022-05-16 14:25:22 +02:00
|
|
|
/>
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta property='og:site_name' content={longName} />
|
2022-03-24 15:00:14 +01:00
|
|
|
|
|
|
|
{/* Twitter card Metadata */}
|
|
|
|
<meta name='twitter:card' content='summary' />
|
2023-02-10 12:42:05 +01:00
|
|
|
<meta name='twitter:description' content={description} />
|
|
|
|
<meta name='twitter:title' content={longName} />
|
|
|
|
<meta name='twitter:image:src' content={icons?.image} />
|
2022-03-24 15:00:14 +01:00
|
|
|
</Head>
|
|
|
|
)
|
|
|
|
}
|
2022-05-16 14:25:22 +02:00
|
|
|
|
|
|
|
export default NextHead
|