Skip to content

site: derive installable and upcoming component counts from catalog data#200

Open
highoncomputers wants to merge 1 commit into
Ducksss:devfrom
highoncomputers:site/derive-component-counts
Open

site: derive installable and upcoming component counts from catalog data#200
highoncomputers wants to merge 1 commit into
Ducksss:devfrom
highoncomputers:site/derive-component-counts

Conversation

@highoncomputers

Copy link
Copy Markdown
Contributor

Problem

The catalog intro and component-family labels hard-code install counts: "Fifty-eight page blocks install today" and "8 post components." Every time a new component ships, someone has to remember to update these strings — and the ROADMAP refresh in #196 showed exactly how easy it is for them to drift.

Solution

Derive the counts from componentEntries and upcomingComponents so they always match what the catalog actually ships. The derived values sit right after the arrays in site.ts, so future component additions update the copy automatically.

Changes

  • installablePageCount and upcomingPostCount — new exports computed from the catalog arrays
  • componentsIntro — switched from a hard-coded string to a template literal with derived counts
  • componentFamilies.pages.countLabel and .posts.countLabel — derive from data instead of hard-coding
  • About page intro string — uses the new derived exports
  • The existing integration test (fumadocs-site.int.spec.ts) already asserts against derived values — no test changes needed

Closes #131

…ata (Ducksss#131)

Instead of hard-coding '58 installable' and '8 in development' in site copy,
compute the counts from componentEntries and upcomingComponents. The derived
values sit right after the arrays so they can never drift from what the
catalog actually ships.

- Add installablePageCount and upcomingPostCount exports
- componentsIntro now uses a template literal with derived counts
- componentFamilies.pages.countLabel and .posts.countLabel derive from data
- about page intro uses the derived counts instead of hard-coded text
- Existing fumadocs-site.int.spec.ts already asserts against derived values

Closes Ducksss#131
@highoncomputers highoncomputers requested a review from Ducksss as a code owner June 23, 2026 19:20
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@highoncomputers is attempting to deploy a commit to the ducksss' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant