|
|
|
@ -79,8 +79,12 @@ async function createProductionRouter() {
|
|
|
|
|
const fullUrl = `${req.protocol}://${req.get('host')}${req.originalUrl}`
|
|
|
|
|
const metaTagsHtml =
|
|
|
|
|
'' +
|
|
|
|
|
(metadata.title ? `<meta property="og:title" content="${metadata.title}" />\n` : '') +
|
|
|
|
|
(metadata.description ? `<meta property="og:description" content="${metadata.description}" />\n` : '') +
|
|
|
|
|
(metadata.title ? `<meta property="og:title" content="${metadata.title ?? 'PHC | Problemi'}" />\n` : '') +
|
|
|
|
|
(metadata.description
|
|
|
|
|
? `<meta property="og:description" content="${
|
|
|
|
|
metadata.description ?? 'Bacheca di problemi di matematica creato dal PHC'
|
|
|
|
|
}" />\n`
|
|
|
|
|
: '') +
|
|
|
|
|
`<meta property="og:url" content="${fullUrl}" />\n`
|
|
|
|
|
|
|
|
|
|
res.send(transformedTemplate.replace('<!-- INJECT META TAGS -->', metaTagsHtml).replace('<!-- SSR OUTLET -->', html))
|
|
|
|
|