diff --git a/src/components/Seo/index.tsx b/src/components/Seo/index.tsx new file mode 100644 index 0000000..374df43 --- /dev/null +++ b/src/components/Seo/index.tsx @@ -0,0 +1,43 @@ +import React, { FC } from "react" +import PropTypes from "prop-types" +import { useStaticQuery, graphql } from "gatsby" + +interface seoType { + description: string, + title : string, + children: React.ReactNode; +} + +const SEO: FC = (props) => { + const { site } = useStaticQuery( + graphql` + query { + site { + siteMetadata { + title + description + author + } + } + } + ` + ) + + const metaDescription = props.description || site.siteMetadata.description + + return ( + <> + + {props.title} + + + + + + + {props.children} + + ) +} + +export default SEO \ No newline at end of file diff --git a/src/pages/Layout/index.tsx b/src/pages/Layout/index.tsx index e5a2c65..735265c 100644 --- a/src/pages/Layout/index.tsx +++ b/src/pages/Layout/index.tsx @@ -1,36 +1,31 @@ import React from "react"; -import { graphql, Script } from "gatsby"; +import { graphql, HeadProps, PageProps, Script } from "gatsby"; import config from '../../../data/site-config'; import Base from "../../components/Base"; -import SEO from "../../components/seo"; +import SEO from "../../components/Seo"; +import Comment from "../../components/Comment" import { MDXProvider } from '@mdx-js/react'; import './styles.scss'; -import './isso.css'; -const Comment = ({post_id}) => { - return ( - <> -