5 files changed
+70
-49
No files matched your search
Generated
+17
@@ -14,6 +14,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"next": "^12.2.5",
|
"next": "^12.2.5",
|
||||||
|
"next-seo": "^5.5.0",
|
||||||
"rc-tooltip": "^5.1.0",
|
"rc-tooltip": "^5.1.0",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
@@ -2673,6 +2674,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/next-seo": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-5ouBHFtx8YrSDW44lj0qIEQ+oMcz6stgoITB+SqHUZbhgizoJsyLmq73gJ0lxtEKpcN8vG2QgRIJfdb8OAPChw==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"next": "^8.1.1-canary.54 || >=9.0.0",
|
||||||
|
"react": ">=16.0.0",
|
||||||
|
"react-dom": ">=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/node-abi": {
|
"node_modules/node-abi": {
|
||||||
"version": "3.24.0",
|
"version": "3.24.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.24.0.tgz",
|
||||||
@@ -5958,6 +5969,12 @@
|
|||||||
"use-sync-external-store": "1.2.0"
|
"use-sync-external-store": "1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"next-seo": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/next-seo/-/next-seo-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-5ouBHFtx8YrSDW44lj0qIEQ+oMcz6stgoITB+SqHUZbhgizoJsyLmq73gJ0lxtEKpcN8vG2QgRIJfdb8OAPChw==",
|
||||||
|
"requires": {}
|
||||||
|
},
|
||||||
"node-abi": {
|
"node-abi": {
|
||||||
"version": "3.24.0",
|
"version": "3.24.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.24.0.tgz",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"next": "^12.2.5",
|
"next": "^12.2.5",
|
||||||
|
"next-seo": "^5.5.0",
|
||||||
"rc-tooltip": "^5.1.0",
|
"rc-tooltip": "^5.1.0",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
|
|||||||
+26
-4
@@ -2,7 +2,7 @@ import Head from "next/head"
|
|||||||
import { App } from "src/components/App"
|
import { App } from "src/components/App"
|
||||||
import { tail } from "lodash"
|
import { tail } from "lodash"
|
||||||
import { Page } from "src/components/Page"
|
import { Page } from "src/components/Page"
|
||||||
import { Meta } from "src/components/Meta"
|
import { NextSeo } from "next-seo"
|
||||||
import { MetaBuilder } from "src/lib/meta"
|
import { MetaBuilder } from "src/lib/meta"
|
||||||
import { apiGet } from "@/next-lib"
|
import { apiGet } from "@/next-lib"
|
||||||
import { GetStaticProps, NextPage } from "next"
|
import { GetStaticProps, NextPage } from "next"
|
||||||
@@ -57,6 +57,30 @@ const Index: NextPage<Props> = props => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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
|
<App
|
||||||
contentStyle={{
|
contentStyle={{
|
||||||
marginTop: "var(--size-l)",
|
marginTop: "var(--size-l)",
|
||||||
@@ -67,9 +91,6 @@ const Index: NextPage<Props> = props => {
|
|||||||
>
|
>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{props.title}</title>
|
<title>{props.title}</title>
|
||||||
{!props.meta ? null : (
|
|
||||||
<Meta meta={props.meta} />
|
|
||||||
)}
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Page
|
<Page
|
||||||
@@ -145,6 +166,7 @@ const Index: NextPage<Props> = props => {
|
|||||||
</article>
|
</article>
|
||||||
</Page>
|
</Page>
|
||||||
</App>
|
</App>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-6
@@ -1,6 +1,6 @@
|
|||||||
import Head from "next/head"
|
import Head from "next/head"
|
||||||
import { App } from "src/components/App"
|
import { App } from "src/components/App"
|
||||||
import { Meta } from "src/components/Meta"
|
import { NextSeo } from "next-seo"
|
||||||
import { PageGrid } from "src/components/PageGrid"
|
import { PageGrid } from "src/components/PageGrid"
|
||||||
import { HudozkaTitle } from "src/components/HudozkaTitle"
|
import { HudozkaTitle } from "src/components/HudozkaTitle"
|
||||||
import { MetaBuilder } from "src/lib/meta"
|
import { MetaBuilder } from "src/lib/meta"
|
||||||
@@ -17,15 +17,34 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Index: NextPage<Props> = props => (
|
const Index: NextPage<Props> = props => (
|
||||||
|
<>
|
||||||
|
<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,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Head>
|
||||||
|
<title>{props.title}</title>
|
||||||
|
</Head>
|
||||||
<App
|
<App
|
||||||
showAuthor={true}
|
showAuthor={true}
|
||||||
menu={props.menu}
|
menu={props.menu}
|
||||||
>
|
>
|
||||||
<Head>
|
|
||||||
<title>{props.title}</title>
|
|
||||||
<Meta meta={props.meta} />
|
|
||||||
</Head>
|
|
||||||
|
|
||||||
<HudozkaTitle
|
<HudozkaTitle
|
||||||
style={{
|
style={{
|
||||||
marginTop: "var(--size-m)",
|
marginTop: "var(--size-m)",
|
||||||
@@ -37,6 +56,7 @@ const Index: NextPage<Props> = props => (
|
|||||||
items={props.items}
|
items={props.items}
|
||||||
/>
|
/>
|
||||||
</App>
|
</App>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
export const getStaticProps: GetStaticProps<Props> = async () => {
|
export const getStaticProps: GetStaticProps<Props> = async () => {
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
import { IMeta } from "src/types"
|
|
||||||
|
|
||||||
export type MetaProps = {
|
|
||||||
meta: IMeta
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Meta: React.FC<MetaProps> = ({ meta }) => (
|
|
||||||
<>
|
|
||||||
{/* Search Engine */}
|
|
||||||
<meta name="description" content={meta.description} />
|
|
||||||
<meta name="image" content={meta.image} />
|
|
||||||
|
|
||||||
{/* Schema.org for Google */}
|
|
||||||
<meta itemProp="name" content={meta.title} />
|
|
||||||
<meta itemProp="description" content={meta.description} />
|
|
||||||
<meta itemProp="image" content={meta.image} />
|
|
||||||
|
|
||||||
{/* Open Graph general (Facebook, Pinterest & Google+) */}
|
|
||||||
<meta property="og:title" content={meta.title} />
|
|
||||||
<meta property="og:description" content={meta.description} />
|
|
||||||
<meta property="og:image" content={meta.image} />
|
|
||||||
<meta property="og:image:width" content={meta.imageWidth.toString()} />
|
|
||||||
<meta property="og:image:height" content={meta.imageHeight.toString()} />
|
|
||||||
<meta property="og:url" content={meta.url} />
|
|
||||||
<meta property="og:site_name" content={meta.siteName} />
|
|
||||||
<meta property="og:locale" content={meta.locale} />
|
|
||||||
<meta property="og:type" content={meta.type} />
|
|
||||||
|
|
||||||
{/* Twitter */}
|
|
||||||
<meta name="twitter:card" content={meta.twitterCard} />
|
|
||||||
<meta name="twitter:title" content={meta.title} />
|
|
||||||
<meta name="twitter:description" content={meta.description} />
|
|
||||||
<meta name="twitter:image:src" content={meta.image} />
|
|
||||||
<meta name="twitter:domain" content={meta.domain} />
|
|
||||||
<meta name="twitter:url" content={meta.url} />
|
|
||||||
<meta name="twitter:site" content={meta.twitterSite} />
|
|
||||||
<meta name="twitter:creator" content={meta.twitterCreator} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
Reference in new issue
Block a user