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