From a66fb875aca72e892f6b98c996db0bfbccc4f387 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 22 Apr 2025 14:43:44 +0100 Subject: [PATCH] add twitter tags --- apps/server/src/core/share/share-seo.controller.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/server/src/core/share/share-seo.controller.ts b/apps/server/src/core/share/share-seo.controller.ts index f813148a..10493fcf 100644 --- a/apps/server/src/core/share/share-seo.controller.ts +++ b/apps/server/src/core/share/share-seo.controller.ts @@ -73,12 +73,14 @@ export class ShareSeoController { rawTitle.length > 80 ? `${rawTitle.slice(0, 77)}…` : rawTitle; const metaTagVar = ''; - let metaTags = ''; - metaTags = `\n`; - if (!share.searchIndexing) { - metaTags += '\n'; - } + const metaTags = [ + ``, + ``, + !share.searchIndexing ? `` : '', + ] + .filter(Boolean) + .join('\n '); const html = fs.readFileSync(indexFilePath, 'utf8'); const transformedHtml = html