diff --git a/packages/logos-docusaurus-preset/static/Acid.info/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Acid.info/theme/image/logo-og.svg new file mode 100644 index 0000000..6d73f07 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Acid.info/theme/image/logo-og.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/logos-docusaurus-preset/static/Codex/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Codex/theme/image/logo-og.svg new file mode 100644 index 0000000..a92b3f1 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Codex/theme/image/logo-og.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/logos-docusaurus-preset/static/Logos/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Logos/theme/image/logo-og.svg new file mode 100644 index 0000000..7053696 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Logos/theme/image/logo-og.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/logos-docusaurus-preset/static/Nimbus/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Nimbus/theme/image/logo-og.svg new file mode 100644 index 0000000..649cdd0 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Nimbus/theme/image/logo-og.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/logos-docusaurus-preset/static/Nomos/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Nomos/theme/image/logo-og.svg new file mode 100644 index 0000000..68b9000 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Nomos/theme/image/logo-og.svg @@ -0,0 +1,1570 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/logos-docusaurus-preset/static/VacResearch/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/VacResearch/theme/image/logo-og.svg new file mode 100644 index 0000000..bee381b --- /dev/null +++ b/packages/logos-docusaurus-preset/static/VacResearch/theme/image/logo-og.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/logos-docusaurus-preset/static/Waku/theme/image/logo-og.svg b/packages/logos-docusaurus-preset/static/Waku/theme/image/logo-og.svg new file mode 100644 index 0000000..cada672 --- /dev/null +++ b/packages/logos-docusaurus-preset/static/Waku/theme/image/logo-og.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx b/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx index 1cd32cd..4d57cf2 100644 --- a/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx +++ b/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx @@ -47,6 +47,10 @@ const options: ImageGeneratorOptions = { ], } +const SIDE_IMAGE_WIDTH = options.width / 2 +const SIDE_IMAGE_HEIGHT = options.height +const LOGO_HEIGHT = 80 + const Layout: React.FC<{ logo?: React.ReactNode image?: React.ReactNode @@ -106,9 +110,7 @@ const Layout: React.FC<{ overflow: 'hidden', }} > -
- {logo} -
+
{logo}
{title}
{footerItems.length > 0 && ( @@ -156,9 +158,7 @@ const Layout: React.FC<{ justifyContent: 'space-between', }} > -
- {logo} -
+
{logo}
{title}
{doc.version.label} ), ]} - logo={logo && } + logo={ + logo && + } image={ image && ( author.name) .join(', ')}`, ]} - logo={logo && } + logo={ + logo && + } image={ image && ( } + logo={ + logo && + } image={ image && ( { - const logo: any = (siteConfig.themeConfig as any).navbar.logo - - return await loadImage(outDir, logo.src, { height: 120 }) -} +const getLogo = async (siteConfig: DocusaurusConfig, outDir: string) => + await loadImage(outDir, '/theme/image/logo-og.svg', { height: LOGO_HEIGHT }) const getPageImage = async ( type: 'docs' | 'blog' | 'page', @@ -324,8 +327,8 @@ const getPageImage = async ( if (typeof image === 'string' && image.length > 0) return await loadImage(outDir, image, { - width: options.width / 2, - height: options.height, + width: SIDE_IMAGE_WIDTH, + height: SIDE_IMAGE_HEIGHT, fit: 'cover', })