aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2022-11-18 16:28:18 -0500
committerKevin J Hoerr <kjhoerr@protonmail.com>2022-11-18 16:28:18 -0500
commit4ea38d6249ffb2a146876bc3c7d4f79e6bbbe832 (patch)
tree6dcd359a342f9f9152e32e59ecc4b0a33ebafc43 /src/components
parentb69eb4df9f1a77d7974a0088a5d5c5a3db68ae99 (diff)
downloadsubmelon.dev-4ea38d6249ffb2a146876bc3c7d4f79e6bbbe832.tar.gz
submelon.dev-4ea38d6249ffb2a146876bc3c7d4f79e6bbbe832.tar.bz2
submelon.dev-4ea38d6249ffb2a146876bc3c7d4f79e6bbbe832.zip
Upgrade dependencies: Gatsby 5.0.1
Diffstat (limited to 'src/components')
-rw-r--r--src/components/SEO.tsx103
1 files changed, 20 insertions, 83 deletions
diff --git a/src/components/SEO.tsx b/src/components/SEO.tsx
index e3683df..6d3323b 100644
--- a/src/components/SEO.tsx
+++ b/src/components/SEO.tsx
@@ -1,88 +1,25 @@
import React from "react";
-import PropTypes from "prop-types";
-import { Helmet } from "react-helmet";
-import { useStaticQuery, graphql } from "gatsby";
-interface MetaProps {
- name: string;
- content: string;
-}
-
-interface SEOProps {
- description: string;
- lang: string;
- meta: MetaProps[];
- title: string;
-}
-
-function SEO({ description, lang, meta, title }: SEOProps): React.ReactElement {
- const { site } = useStaticQuery(
- graphql`
- query {
- site {
- siteMetadata {
- title
- description
- author
- }
- }
- }
- `
- );
- const metaDescription = description || site.siteMetadata.description;
+export function Head(): React.ReactElement {
+ const metaDescription =
+ "The official website of Kevin Hoerr, developer of websites.";
return (
- <Helmet
- htmlAttributes={{
- lang,
- }}
- title={title}
- titleTemplate={`%s | ${site.siteMetadata.title}`}
- meta={[
- {
- name: `description`,
- content: metaDescription,
- },
- {
- property: `og:title`,
- content: title,
- },
- {
- property: `og:description`,
- content: metaDescription,
- },
- {
- property: `og:type`,
- content: `website`,
- },
- {
- name: `twitter:card`,
- content: `summary`,
- },
- {
- name: `twitter:creator`,
- content: site.siteMetadata.author,
- },
- {
- name: `twitter:title`,
- content: title,
- },
- {
- name: `twitter:description`,
- content: metaDescription,
- },
- ].concat(meta)}
- />
+ <>
+ <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:card" content="summary" />
+ <meta property="og:type" content="website" />
+ <meta property="og:description" content={metaDescription} />
+ <meta
+ property="og:title"
+ content="Kevin J Hoerr &lt;kjhoerr@submelon.tech&gt;"
+ />
+ <meta name="description" content={metaDescription} />
+ <title>Kevin J Hoerr &lt;kjhoerr@submelon.tech&gt;</title>
+ </>
);
}
-SEO.defaultProps = {
- lang: `en`,
- meta: [],
- description: ``,
-};
-SEO.propTypes = {
- description: PropTypes.string,
- lang: PropTypes.string,
- meta: PropTypes.arrayOf(PropTypes.object),
- title: PropTypes.string.isRequired,
-};
-export default SEO;