diff --git a/src/routes/pages.js b/src/routes/pages.js index c96f9816..b2393d0e 100644 --- a/src/routes/pages.js +++ b/src/routes/pages.js @@ -63,8 +63,16 @@ module.exports = function () { const source = await readFile(config.viewMain, 'utf-8') const template = handlebars.compile(source) + const title = page.title + const meta = { + title, + description: title, + image: 'https://art.shlisselburg.org/entrance.jpg', + url: `https://art.shlisselburg.org${path}`, + } + ctx.type = 'text/html' - ctx.body = template({content}) + ctx.body = template({content, title, meta}) } else { ctx.status = 404 } diff --git a/src/views/main.hbs b/src/views/main.hbs index 0107dbb9..090bcbdb 100644 --- a/src/views/main.hbs +++ b/src/views/main.hbs @@ -1,6 +1,38 @@
+ + +