5 files changed
+159
-138
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",
|
||||||
|
|||||||
+103
-81
@@ -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,94 +57,116 @@ const Index: NextPage<Props> = props => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<App
|
<>
|
||||||
contentStyle={{
|
{!props.meta ? null : (
|
||||||
marginTop: "var(--size-l)",
|
<NextSeo
|
||||||
marginBottom: "var(--size-xl)",
|
title={props.meta.title}
|
||||||
}}
|
description={props.meta.description}
|
||||||
menu={props.menu}
|
canonical="https://art.shlisselburg.org/"
|
||||||
breadcrumbs={props.breadcrumb}
|
openGraph={{
|
||||||
>
|
url: props.meta.url,
|
||||||
<Head>
|
title: props.meta.title,
|
||||||
<title>{props.title}</title>
|
description: props.meta.description,
|
||||||
{!props.meta ? null : (
|
images: [
|
||||||
<Meta meta={props.meta} />
|
{
|
||||||
)}
|
url: props.meta.image,
|
||||||
</Head>
|
width: props.meta.imageWidth,
|
||||||
|
height: props.meta.imageHeight,
|
||||||
|
alt: props.meta.description,
|
||||||
|
type: "image/jpeg",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
site_name: props.meta.siteName,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<Page
|
<App
|
||||||
tags={props.tags}
|
contentStyle={{
|
||||||
date={props.date ? new Date(props.date) : undefined}
|
marginTop: "var(--size-l)",
|
||||||
|
marginBottom: "var(--size-xl)",
|
||||||
|
}}
|
||||||
|
menu={props.menu}
|
||||||
|
breadcrumbs={props.breadcrumb}
|
||||||
>
|
>
|
||||||
<article className={"article"}>
|
<Head>
|
||||||
{props.tokens.map((x, i) => {
|
<title>{props.title}</title>
|
||||||
switch (x.token) {
|
</Head>
|
||||||
case "html":
|
|
||||||
return (
|
|
||||||
<Html
|
|
||||||
key={i}
|
|
||||||
html={x.data}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
|
|
||||||
case "instagram":
|
<Page
|
||||||
return (
|
tags={props.tags}
|
||||||
<Html
|
date={props.date ? new Date(props.date) : undefined}
|
||||||
key={i}
|
>
|
||||||
html={x.data.embed}
|
<article className={"article"}>
|
||||||
/>
|
{props.tokens.map((x, i) => {
|
||||||
)
|
switch (x.token) {
|
||||||
|
case "html":
|
||||||
|
return (
|
||||||
|
<Html
|
||||||
|
key={i}
|
||||||
|
html={x.data}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
|
||||||
case "youtube":
|
case "instagram":
|
||||||
return (
|
return (
|
||||||
<Youtube
|
<Html
|
||||||
key={i}
|
key={i}
|
||||||
url={x.data.url}
|
html={x.data.embed}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
case "image":
|
case "youtube":
|
||||||
return (
|
return (
|
||||||
<Picture
|
<Youtube
|
||||||
key={i}
|
key={i}
|
||||||
src={x.data.src}
|
url={x.data.url}
|
||||||
alt={x.data.alt}
|
/>
|
||||||
width={x.data.width}
|
)
|
||||||
height={x.data.height}
|
|
||||||
caption={x.data.caption}
|
|
||||||
blur={x.data.blur}
|
|
||||||
wide={x.wide}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
|
|
||||||
case "file":
|
case "image":
|
||||||
return (
|
return (
|
||||||
<FileCard
|
<Picture
|
||||||
key={i}
|
key={i}
|
||||||
sign={props.documentSignature}
|
src={x.data.src}
|
||||||
{...x.data}
|
alt={x.data.alt}
|
||||||
/>
|
width={x.data.width}
|
||||||
)
|
height={x.data.height}
|
||||||
|
caption={x.data.caption}
|
||||||
|
blur={x.data.blur}
|
||||||
|
wide={x.wide}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
|
||||||
case "grid":
|
case "file":
|
||||||
return (
|
return (
|
||||||
<PageGrid
|
<FileCard
|
||||||
key={i}
|
key={i}
|
||||||
items={x.data.items}
|
sign={props.documentSignature}
|
||||||
/>
|
{...x.data}
|
||||||
)
|
/>
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
case "grid":
|
||||||
return (
|
return (
|
||||||
<pre key={i}>
|
<PageGrid
|
||||||
{JSON.stringify(x)}
|
key={i}
|
||||||
</pre>
|
items={x.data.items}
|
||||||
)
|
/>
|
||||||
}
|
)
|
||||||
})}
|
|
||||||
</article>
|
default:
|
||||||
</Page>
|
return (
|
||||||
</App>
|
<pre key={i}>
|
||||||
|
{JSON.stringify(x)}
|
||||||
|
</pre>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</article>
|
||||||
|
</Page>
|
||||||
|
</App>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+38
-18
@@ -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,26 +17,46 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Index: NextPage<Props> = props => (
|
const Index: NextPage<Props> = props => (
|
||||||
<App
|
<>
|
||||||
showAuthor={true}
|
<NextSeo
|
||||||
menu={props.menu}
|
title={props.meta.title}
|
||||||
>
|
description={props.meta.description}
|
||||||
<Head>
|
canonical="https://art.shlisselburg.org/"
|
||||||
<title>{props.title}</title>
|
openGraph={{
|
||||||
<Meta meta={props.meta} />
|
url: props.meta.url,
|
||||||
</Head>
|
title: props.meta.title,
|
||||||
|
description: props.meta.description,
|
||||||
<HudozkaTitle
|
images: [
|
||||||
style={{
|
{
|
||||||
marginTop: "var(--size-m)",
|
url: props.meta.image,
|
||||||
marginBottom: "var(--size-m)",
|
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
|
||||||
|
showAuthor={true}
|
||||||
|
menu={props.menu}
|
||||||
|
>
|
||||||
|
<HudozkaTitle
|
||||||
|
style={{
|
||||||
|
marginTop: "var(--size-m)",
|
||||||
|
marginBottom: "var(--size-m)",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<PageGrid
|
<PageGrid
|
||||||
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