mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 17:25:59 +02:00
feat(resources): improve SEO
This commit is contained in:
@@ -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={[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user