use next seo on slug page
This commit is contained in:
1 parent
a4ea8230e4
commit
d44db287de
1 file changed
+26
-4
+26
-4
@@ -2,7 +2,7 @@ import Head from "next/head"
|
||||
import { App } from "src/components/App"
|
||||
import { tail } from "lodash"
|
||||
import { Page } from "src/components/Page"
|
||||
import { Meta } from "src/components/Meta"
|
||||
import { NextSeo } from "next-seo"
|
||||
import { MetaBuilder } from "src/lib/meta"
|
||||
import { apiGet } from "@/next-lib"
|
||||
import { GetStaticProps, NextPage } from "next"
|
||||
@@ -57,6 +57,30 @@ const Index: NextPage<Props> = props => {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{!props.meta ? null : (
|
||||
<NextSeo
|
||||
title={props.meta.title}
|
||||
description={props.meta.description}
|
||||
canonical="https://art.shlisselburg.org/"
|
||||
openGraph={{
|
||||
url: props.meta.url,
|
||||
title: props.meta.title,
|
||||
description: props.meta.description,
|
||||
images: [
|
||||
{
|
||||
url: props.meta.image,
|
||||
width: props.meta.imageWidth,
|
||||
height: props.meta.imageHeight,
|
||||
alt: props.meta.description,
|
||||
type: "image/jpeg",
|
||||
},
|
||||
],
|
||||
site_name: props.meta.siteName,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<App
|
||||
contentStyle={{
|
||||
marginTop: "var(--size-l)",
|
||||
@@ -67,9 +91,6 @@ const Index: NextPage<Props> = props => {
|
||||
>
|
||||
<Head>
|
||||
<title>{props.title}</title>
|
||||
{!props.meta ? null : (
|
||||
<Meta meta={props.meta} />
|
||||
)}
|
||||
</Head>
|
||||
|
||||
<Page
|
||||
@@ -145,6 +166,7 @@ const Index: NextPage<Props> = props => {
|
||||
</article>
|
||||
</Page>
|
||||
</App>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user