diff --git a/src/components/seo/SEOHead.tsx b/src/components/seo/SEOHead.tsx new file mode 100644 index 0000000..c7d2391 --- /dev/null +++ b/src/components/seo/SEOHead.tsx @@ -0,0 +1,48 @@ +import { Helmet } from 'react-helmet-async'; + +interface SEOHeadProps { + title: string; + description: string; + path: string; + type?: 'website' | 'article'; + image?: string; + publishedTime?: string; + noindex?: boolean; +} + +const BASE_URL = 'https://texpixel.com'; + +export default function SEOHead({ + title, + description, + path, + type = 'website', + image = 'https://cdn.texpixel.com/public/og-cover.png', + publishedTime, + noindex = false, +}: SEOHeadProps) { + const url = `${BASE_URL}${path}`; + const fullTitle = path === '/' ? title : `${title} | TexPixel`; + + return ( + + {fullTitle} + + + {noindex && } + + + + + + + + {publishedTime && } + + + + + + + ); +}