fix 2
continuous-integration/drone/push Build is passing Details

dev
Antonio De Lucreziis 11 months ago
parent 1ab4bbb204
commit 7b9d9ac757

@ -48,13 +48,13 @@ async function createDevRouter(db: DatabaseConnection) {
const fullUrl = `https://${req.get('host')}${req.originalUrl}`
const metaTagsHtml =
'' +
(metadata.title ? `<meta property="og:title" content="${metadata.title ?? 'PHC | Problemi'}" />\n` : '') +
(metadata.title ? `<meta property="og:title" content="${metadata.title ?? 'PHC | Problemi'}">\n` : '') +
(metadata.description
? `
<meta name="description" content="${metadata.description}" />
<meta property="og:description" content="${metadata.description ?? 'Bacheca di problemi di matematica creato dal PHC'}" />\n`
<meta name="description" content="${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`
`<meta property="og:url" content="${fullUrl}">\n`
res.send(transformedTemplate.replace('<!-- INJECT META TAGS -->', metaTagsHtml).replace('<!-- SSR OUTLET -->', html))
} catch (error: any) {
@ -84,14 +84,14 @@ async function createProductionRouter(db: DatabaseConnection) {
const metaTagsHtml =
'' +
(metadata.title
? `<meta property="og:title" content="${metadata.title}" />\n`
: `<meta property="og:title" content="PHC | Problemi" />\n`) +
? `<meta property="og:title" content="${metadata.title}">\n`
: `<meta property="og:title" content="PHC | Problemi">\n`) +
(metadata.description
? `<meta name="description" content="${metadata.description}" />
<meta property="og:description" content="${metadata.description}" />\n`
: `<meta name="description" content="Bacheca di problemi di matematica creato dal PHC" />
<meta property="og:description" content="Bacheca di problemi di matematica creato dal PHC" />\n`) +
`<meta property="og:url" content="${fullUrl}" />\n`
? `<meta name="description" content="${metadata.description}">
<meta property="og:description" content="${metadata.description}">\n`
: `<meta name="description" content="Bacheca di problemi di matematica creato dal PHC">
<meta property="og:description" content="Bacheca di problemi di matematica creato dal PHC">\n`) +
`<meta property="og:url" content="${fullUrl}">\n`
const finalHtml = transformedTemplate.replace('<!-- INJECT META TAGS -->', metaTagsHtml).replace('<!-- SSR OUTLET -->', html)

Loading…
Cancel
Save