From 804626a0bad8c1aad3e265d36497e34c17584883 Mon Sep 17 00:00:00 2001 From: WKHAllen Date: Sun, 2 Aug 2020 15:02:01 -0400 Subject: [PATCH] Use Open Graph Protocol --- src/routes/util.ts | 1 + src/views/layouts/default.html | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/routes/util.ts b/src/routes/util.ts index 1da4bcd..944a3cd 100644 --- a/src/routes/util.ts +++ b/src/routes/util.ts @@ -253,6 +253,7 @@ export function adminAuth (req: Request, res: Response, next: NextFunction) { // Render a page export function renderPage(req: Request, res: Response, page: string, options: any) { options = options || {}; + options.url = req.originalUrl; services.MetaService.getMeta('Version', (version) => { options.version = version; if (!req.session || !req.session.sessionId) { diff --git a/src/views/layouts/default.html b/src/views/layouts/default.html index cd5b8f4..1db3943 100644 --- a/src/views/layouts/default.html +++ b/src/views/layouts/default.html @@ -3,14 +3,21 @@ - + + + + + + {{#if title}} - {{title}} - Norse Books + + {{title}} - NorseBooks {{else}} - Norse Books + + NorseBooks {{/if}}