mirror of
https://github.com/docmost/docmost.git
synced 2025-11-18 14:11:09 +10:00
add twitter tags
This commit is contained in:
@ -73,12 +73,14 @@ export class ShareSeoController {
|
|||||||
rawTitle.length > 80 ? `${rawTitle.slice(0, 77)}…` : rawTitle;
|
rawTitle.length > 80 ? `${rawTitle.slice(0, 77)}…` : rawTitle;
|
||||||
|
|
||||||
const metaTagVar = '<!--meta-tags-->';
|
const metaTagVar = '<!--meta-tags-->';
|
||||||
let metaTags = '';
|
|
||||||
|
|
||||||
metaTags = `<meta property="og:title" content="${metaTitle}" />\n`;
|
const metaTags = [
|
||||||
if (!share.searchIndexing) {
|
`<meta property="og:title" content="${metaTitle}" />`,
|
||||||
metaTags += '<meta name="robots" content="noindex" />\n';
|
`<meta property="twitter:title" content="${metaTitle}" />`,
|
||||||
}
|
!share.searchIndexing ? `<meta name="robots" content="noindex" />` : '',
|
||||||
|
]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('\n ');
|
||||||
|
|
||||||
const html = fs.readFileSync(indexFilePath, 'utf8');
|
const html = fs.readFileSync(indexFilePath, 'utf8');
|
||||||
const transformedHtml = html
|
const transformedHtml = html
|
||||||
|
|||||||
Reference in New Issue
Block a user