diff --git a/.github/workflows/utterances.yml b/.github/workflows/utterances.yml index 25a76bd..a4f155e 100644 --- a/.github/workflows/utterances.yml +++ b/.github/workflows/utterances.yml @@ -1,11 +1,11 @@ name: Close utterances issue on: issues: - types: [labeled] + types: [opened] jobs: close-issue: runs-on: ubuntu-latest steps: - - if: github.event.label.name == 'utterances' + - if: github.event.issue.user.login == 'utterances-bot' name: Close Issue uses: peter-evans/close-issue@v1 diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 7e9fbde..9477c6b 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -1,10 +1,9 @@ import React from 'react'; import styled, { ThemeProvider } from 'styled-components'; -import { Helmet } from 'react-helmet'; import GlobalStyle from '../../styles/GlobalStyle'; import { theme } from '../../styles/theme'; import Header from '../Header'; -import useSiteMetaData from '../../hooks/useSiteMetaData'; +import SEO from '../SEO'; const ContentWrapper = styled.div` margin: 0 auto; @@ -28,24 +27,10 @@ type Props = { }; const Layout = ({ children, path, title, description, image }: Props) => { - const { title: siteName, siteUrl } = useSiteMetaData(); - return ( <> - - {title} - - - - - - - - +
{children} diff --git a/src/components/SEO/index.tsx b/src/components/SEO/index.tsx new file mode 100644 index 0000000..4e857e0 --- /dev/null +++ b/src/components/SEO/index.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import useSiteMetaData from '../../hooks/useSiteMetaData'; +import { Helmet } from 'react-helmet'; + +type Props = { + title: string; + description?: string; + image?: string; +}; + +const SEO = ({ title, description, image }: Props) => { + const { title: siteName, siteUrl } = useSiteMetaData(); + + return ( + + + {title} | {siteName} + + + + + + + + + + ); +}; + +export default SEO; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 1e924f7..b4162e0 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,10 +4,10 @@ import PostList from '../components/Main/PostList'; import useSiteMetaData from '../hooks/useSiteMetaData'; const IndexPage = () => { - const { title, description } = useSiteMetaData(); + const { description } = useSiteMetaData(); return ( - + );