From 7fb04d8ffa1039b2e1b9f923d6ea1e9d7ce06504 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Fri, 2 Aug 2019 23:46:51 +0300 Subject: [PATCH] gallery page meta --- pages/gallery.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/gallery.jsx b/pages/gallery.jsx index 5c824681..45c7c154 100644 --- a/pages/gallery.jsx +++ b/pages/gallery.jsx @@ -4,9 +4,11 @@ import Head from 'next/head' import App from '../src/components/App' // import Album from '../src/components/Album' import Article from '../src/components/Article' +import { Meta } from '../src/components/Meta' import menuModel from '../src/models/menu' import { buildMenu } from '../src/lib/menu' import { splitBy } from '../src/lib/array' +import { meta } from '../src/lib/meta' const albumsByYear = splitBy(album => new Date(album.date).getFullYear()) @@ -58,6 +60,7 @@ const Page = (props) => ( > {props.title} +
@@ -84,11 +87,16 @@ Page.getInitialProps = async (ctx) => { const res = await axios.get(apiUrl) const items = res.data.items const albumCollections = albumsByYear(items) + const title = 'Галерея' return { collections: [...albumCollections.entries()], pageUrl, - title: 'Галерея', + title, + meta: meta({ + title, + description: 'Галерея работ учащихся Шлиссельбургской Детской Художественной Школы' + }) } }