feat(resources): improve SEO

This commit is contained in:
Jean-Philippe Sirois
2020-05-21 00:54:59 -04:00
parent af5e633683
commit 4a18696e9f
3 changed files with 17 additions and 3 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ interface ISEOProps {
readonly meta?: any[]
readonly keywords?: string[]
readonly title: string
readonly subCategory?: string | null
}
export const SEO: FC<ISEOProps> = ({
@@ -16,6 +17,7 @@ export const SEO: FC<ISEOProps> = ({
meta = [],
keywords = [],
title,
subCategory,
}) => {
const { site } = useStaticQuery(
graphql`
@@ -38,7 +40,7 @@ export const SEO: FC<ISEOProps> = ({
htmlAttributes={{
lang,
}}
title={title}
title={subCategory ? `${title} - ${subCategory}` : title}
titleTemplate={`%s | ${site.siteMetadata.title}`}
meta={[
{