1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-02-14 21:10:41 +01:00
Matthias Kretschmann 447cada700
Migrate to Next.js + TypeScript (#1038)
* next.js + typescript

* more testing

* script updates

* fixes

* favicon generation

* testing

* readme updates

* tweaks

* tweaks

* move tests

* image tweaks

* ci tweaks

* commit next-env.d.ts for ci

* migrations

* fixes

* fixes

* ci tweaks

* new animations

* project preview tweaks

* add codeclimate config

* dark mode refactor, test tweaks

* readme updates

* animation tweaks

* animate in loaded images

* test update

* update humans.txt
2022-11-15 23:14:59 +00:00

38 lines
964 B
TypeScript

import Head from 'next/head'
import meta from '../../../_content/meta.json'
import resume from '../../../_content/resume.json'
const Meta = ({
title,
description,
image,
slug
}: {
title: string
description?: string
image?: string
slug?: string
}) => {
const twitterHandle = resume.basics.profiles.filter(
({ network }) => network === 'Twitter'
)[0].username
const url = slug ? `${meta.url}/${slug}` : meta.url
return (
<Head>
<link rel="canonical" href={url} />
{/* <!-- Essential META Tags --> */}
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:image" content={`${meta.url}/${image}`} />
<meta property="og:url" content={url} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content={twitterHandle} />
</Head>
)
}
export default Meta