Fix site SEO for icon image

This commit is contained in:
Eric Fennis
2026-03-26 11:53:34 +01:00
parent 1e6b96db3d
commit e1ee65bc23
2 changed files with 20 additions and 2 deletions
+14
View File
@@ -218,6 +218,20 @@ export default defineConfig({
if (ogPath) {
const content = `https://lucide.dev${ogPath}`;
pageData.frontmatter.head.push(
[
'meta',
{
property: 'og:title',
content: pageData.title,
},
],
[
'meta',
{
property: 'og:description',
content: pageData.description,
},
],
[
'meta',
{
+6 -2
View File
@@ -29,8 +29,12 @@ export default async function getStructuredData(iconName: string, pageData: Page
name: iconName,
// TODO: Add support for description extraction from icon metadata
// description: 'An ...SVG icon from the Lucide icon set.',
contentUrl: `https://lucide.dev/api/icons/${iconName}}?width=24&height=24&background=white`,
thumbnailUrl: `https://lucide.dev/api/icons/${iconName}}?width=256&height=256&background=white`,
contentUrl: `https://lucide.dev/api/icons/${iconName}?width=24&height=24&background=white`,
thumbnailUrl: `https://lucide.dev/api/icons/${iconName}?width=256&height=256&background=white`,
acquireLicensePage: 'https://lucide.dev/license',
license: 'https://lucide.dev/license',
copyrightNotice: 'Copyright (c) 2026 Lucide Icons and Contributors',
creditText: 'Lucide Icons',
encodingFormat: 'image/svg+xml',
keywords: pageData.params?.tags,
width: 24,