fix: some style

This commit is contained in:
Kilu 2024-06-28 19:31:16 +08:00
parent 6cb81d7b7c
commit 37864a07ce

View File

@ -92,8 +92,10 @@ const createServer = async (req) => {
let title = 'AppFlowy'; let title = 'AppFlowy';
const url = 'https://appflowy.io'; const url = 'https://appflowy.io';
let image = logo; let image = logo;
try {
// Inject meta data into the HTML to support SEO and social sharing // Inject meta data into the HTML to support SEO and social sharing
if (metaData) { if (metaData && metaData.view) {
title = `${metaData.view.name} | AppFlowy`; title = `${metaData.view.name} | AppFlowy`;
try { try {
@ -105,6 +107,9 @@ const createServer = async (req) => {
// Do nothing // Do nothing
} }
} }
} catch (error) {
logger.error(`Error injecting meta data: ${error}`);
}
$('title').text(title); $('title').text(title);
setOrUpdateMetaTag($, 'meta[name="description"]', 'name', description); setOrUpdateMetaTag($, 'meta[name="description"]', 'name', description);