Skip to content

Docs: read the landing page release badge from the app repository - #8

Merged
SandObserver merged 1 commit into
mainfrom
docs/version-badge-from-app-repo
Aug 23, 2026
Merged

SandObserver merged 1 commit into
mainfrom
docs/version-badge-from-app-repo

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add readAppVersion() to src/lib/repo.ts, reading version from the app repository's api/package.json and returning null when the checkout or the manifest is unreadable.
  • Render the landing page footer release badge from that value instead of a hand-typed string, and carry it in a data-version attribute.
  • Add a verbadge rule to scripts/check-dist.mjs that fails the build when dist/index.html ships without a semver release badge, matching how the generated pages are already gated.

Testing
All green: npm run build and npm run check both pass with STACKYARD_REPO set, and the badge renders v1.7.1 from api/package.json. Building with the checkout absent makes the new rule fail with exit 1, verified. Footer measured in Chrome in both colour schemes: badge geometry is unchanged at 107x23.

Checklist

  • npm run build and npm run check both pass.
  • Product UI is shown by running or capturing it, never recreated in CSS.
  • Any new preview or screenshot carries no private hostnames or real data.
  • Visual changes verified in both colour schemes and both docs themes.
  • Links to the app repo still resolve.

@SandObserver SandObserver added the documentation Improvements or additions to documentation label Aug 23, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying stackyard-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5fda388
Status: ✅  Deploy successful!
Preview URL: https://62b7a65c.stackyard-docs.pages.dev
Branch Preview URL: https://docs-version-badge-from-app.stackyard-docs.pages.dev

View logs

@SandObserver
SandObserver merged commit 26ff87a into main Aug 23, 2026
2 checks passed
@SandObserver
SandObserver deleted the docs/version-badge-from-app-repo branch August 23, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant