Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed Mar 31, 2021
1 parent 6126109 commit fa6f1bc
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/layout/Meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from 'react';

import { NextSeo } from 'next-seo';
import Head from 'next/head';

import { Config } from '../utils/Config';

type IMetaProps = {
title: string;
description: string;
canonical?: string;
};

const Meta = (props: IMetaProps) => (
<>
<Head>
<meta charSet="UTF-8" key="charset" />
<meta name="viewport" content="width=device-width,initial-scale=1" key="viewport" />
<link
rel="apple-touch-icon"
href={`${process.env.baseUrl}/apple-touch-icon.png`}
key="apple"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href={`${process.env.baseUrl}/favicon-32x32.png`}
key="icon32"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href={`${process.env.baseUrl}/favicon-16x16.png`}
key="icon16"
/>
<link rel="icon" href={`${process.env.baseUrl}/favicon.ico`} key="favicon" />
</Head>
<NextSeo
title={props.title}
description={props.description}
canonical={props.canonical}
openGraph={{
title: props.title,
description: props.description,
url: props.canonical,
locale: Config.locale,
site_name: Config.site_name,
}}
/>
</>
);

export { Meta };

0 comments on commit fa6f1bc

Please sign in to comment.