Fix unused variable in generateOgTags
This commit is contained in:
@@ -77,7 +77,7 @@ if (isProduction) {
|
||||
app.use(express.static(clientPath));
|
||||
|
||||
// Helper function to generate OG tags HTML
|
||||
function generateOgTags(baseUrl: string, pageUrl: string, title: string, description: string, ogImageUrl: string | null): string {
|
||||
function generateOgTags(pageUrl: string, title: string, description: string, ogImageUrl: string | null): string {
|
||||
return `
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="${pageUrl}" />
|
||||
@@ -116,7 +116,7 @@ if (isProduction) {
|
||||
ogImageUrl = `${baseUrl}${ogImageUrl}`;
|
||||
}
|
||||
|
||||
const ogTags = generateOgTags(baseUrl, pageUrl, title, description, ogImageUrl);
|
||||
const ogTags = generateOgTags(pageUrl, title, description, ogImageUrl);
|
||||
|
||||
// Insert OG tags before </head>
|
||||
html = html.replace('</head>', `${ogTags}</head>`);
|
||||
@@ -162,7 +162,7 @@ if (isProduction) {
|
||||
ogImageUrl = `${baseUrl}${ogImageUrl}`;
|
||||
}
|
||||
|
||||
const ogTags = generateOgTags(baseUrl, pageUrl, title, description, ogImageUrl);
|
||||
const ogTags = generateOgTags(pageUrl, title, description, ogImageUrl);
|
||||
|
||||
// Insert OG tags before </head>
|
||||
html = html.replace('</head>', `${ogTags}</head>`);
|
||||
|
||||
Reference in New Issue
Block a user