From 832794e035705e7f0a5989ce240a385e5ccebf62 Mon Sep 17 00:00:00 2001
From: Kevin Hoerr <kjhoerr@protonmail.com>
Date: Mon, 28 Nov 2022 17:37:25 -0500
Subject: Reintegrate GraphQL (#23)

* Use GraphQL for site metadata incl version

* Explicit props for passthrough components
---
 src/components/SEO.tsx | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'src/components/SEO.tsx')

diff --git a/src/components/SEO.tsx b/src/components/SEO.tsx
index 3049810..b13dc19 100644
--- a/src/components/SEO.tsx
+++ b/src/components/SEO.tsx
@@ -1,19 +1,17 @@
 import React from "react";
+import { useSiteMetadata } from "../hooks";
 
 export function Head(): React.ReactElement {
-  const metaDescription =
-    "The official website of Kevin Hoerr, developer of websites.";
+  const { author, description, title } = useSiteMetadata();
+
   return (
     <>
-      <meta name="twitter:description" content={metaDescription} />
-      <meta
-        name="twitter:title"
-        content="Kevin J Hoerr &lt;kjhoerr@submelon.tech&gt;"
-      />
-      <meta name="twitter:creator" content="Kevin J Hoerr" />
+      <meta name="twitter:description" content={description ?? ""} />
+      <meta name="twitter:title" content={title ?? ""} />
+      <meta name="twitter:creator" content={author ?? ""} />
       <meta name="twitter:card" content="summary" />
-      <meta name="description" content={metaDescription} />
-      <title>Kevin J Hoerr &lt;kjhoerr@submelon.tech&gt;</title>
+      <meta name="description" content={description ?? ""} />
+      <title>{title}</title>
     </>
   );
 }
-- 
cgit 

