diff --git a/apps/landing-page/app/pages/plugins/[...slug].astro b/apps/landing-page/app/pages/plugins/[...slug].astro index 29a8a59d85..b26610d82a 100644 --- a/apps/landing-page/app/pages/plugins/[...slug].astro +++ b/apps/landing-page/app/pages/plugins/[...slug].astro @@ -3,6 +3,7 @@ import '../../globals.css'; import { createElement } from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { Header } from '../../_components/header'; +import { getCatalogCounts } from '../../_lib/catalog'; import type { PublicPluginEntry } from '../../plugin-registry'; import { getPublicPlugins } from '../../plugin-registry'; @@ -18,7 +19,10 @@ const site = Astro.site ?? new URL('https://open-design.ai'); const canonical = new URL(plugin.detailHref, site).toString(); const title = `${plugin.title} — Open Design Plugin`; const description = `${plugin.description} Install with ${plugin.installCommand}.`; -const headerHtml = renderToStaticMarkup(createElement(Header)); +const catalogCounts = await getCatalogCounts(); +const headerHtml = renderToStaticMarkup( + createElement(Header, { counts: catalogCounts, brandHref: '/' }), +); const related = getPublicPlugins() .filter((item) => item.id !== plugin.id && item.registryId === plugin.registryId) .slice(0, 6); diff --git a/apps/landing-page/app/pages/plugins/index.astro b/apps/landing-page/app/pages/plugins/index.astro index d66ee30269..eb56da9cde 100644 --- a/apps/landing-page/app/pages/plugins/index.astro +++ b/apps/landing-page/app/pages/plugins/index.astro @@ -3,10 +3,12 @@ import '../../globals.css'; import { createElement } from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { Header } from '../../_components/header'; +import { getCatalogCounts } from '../../_lib/catalog'; import { getPublicPlugins, getRegistryCounts } from '../../plugin-registry'; const plugins = getPublicPlugins(); const counts = getRegistryCounts(plugins); +const catalogCounts = await getCatalogCounts(); const previewCount = plugins.filter((plugin) => plugin.preview).length; const surfaceCount = new Set( plugins.map((plugin) => plugin.mode ?? plugin.surface ?? plugin.visualKind), @@ -25,7 +27,9 @@ const site = Astro.site ?? new URL('https://open-design.ai'); const canonical = new URL('/plugins/', site).toString(); const title = 'Open Design Plugins — Official and community registries'; const description = `Browse ${counts.all} Open Design plugins from official and community registries. Search installable agent-native design workflows with stable vendor/plugin IDs.`; -const headerHtml = renderToStaticMarkup(createElement(Header)); +const headerHtml = renderToStaticMarkup( + createElement(Header, { counts: catalogCounts, brandHref: '/' }), +); const itemListJsonLd = { '@context': 'https://schema.org', '@type': 'ItemList', diff --git a/scripts/postinstall.mjs b/scripts/postinstall.mjs index ecc1d91f92..5558e73b75 100644 --- a/scripts/postinstall.mjs +++ b/scripts/postinstall.mjs @@ -8,6 +8,8 @@ const repoRoot = resolve(scriptDir, ".."); const buildTargets = [ "packages/contracts", + "packages/plugin-runtime", + "packages/registry-protocol", "packages/sidecar-proto", "packages/sidecar", "packages/platform",