From 74733a4cca14f457536511433d64f6390de1bef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Mon, 2 Feb 2026 16:55:39 +0100 Subject: [PATCH] bring back og meta tags --- index.html | 1 - server/app.js | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 306b4d8dc..5870aef2c 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,6 @@ type="text/css" /> - The Homebrewery - NaturalCrit diff --git a/server/app.js b/server/app.js index 48f82f634..1cb5f4169 100644 --- a/server/app.js +++ b/server/app.js @@ -576,6 +576,15 @@ export default async function createApp(vite) { userThemes : req.userThemes }; + const ogTags = []; + const ogMeta = req.ogMeta ?? {}; + Object.entries(ogMeta).forEach(([key, value])=>{ + if(!value) return; + const tag = ``; + ogTags.push(tag); + }); + const ogMetaTags = ogTags.join('\n'); + const htmlPath = isProd ? path.resolve('build', 'index.html') : path.resolve('index.html'); let html = fs.readFileSync(htmlPath, 'utf-8'); @@ -585,7 +594,7 @@ export default async function createApp(vite) { html = html.replace( '', - `\n` + `\n\n${ogMetaTags}` ); return html;