add netlify builder to capture social images

plus also added an invalidator that should invalidate the image each
month
This commit is contained in:
Kurt Hutten
2021-07-31 15:25:30 +10:00
parent e4bf8f5e81
commit cbaa79b697
7 changed files with 238 additions and 19 deletions

View File

@@ -0,0 +1,24 @@
import { Helmet } from 'react-helmet'
const Seo = ({ title, description, lang, socialImageUrl}: { title: string; description: string; lang: string; socialImageUrl?: string}) => {
return (
<>
<Helmet
htmlAttributes={{
lang,
}}
title={title}
titleTemplate={`Cadhub - ${title}`}
>
<meta property="og:locale" content={lang} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta name="description" content={description} />
<meta property="og:image" content={socialImageUrl} />
<title>Cadhub - {title}</title>
</Helmet>
</>
)
}
export default Seo