Skip to content

feat(docs): add version badge to footer#571

Merged
bradygaster merged 5 commits intobradygaster:devfrom
diberry:squad/docs-version-badge
Mar 23, 2026
Merged

feat(docs): add version badge to footer#571
bradygaster merged 5 commits intobradygaster:devfrom
diberry:squad/docs-version-badge

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Mar 23, 2026

Summary

Closes: no issue — requested by Dina

Working as EECOM (Core Dev)

Changes

  • *\docs/astro.config.mjs* — Vite \define\ block injects _VERSION_, _COMMIT_SHA_, _BUILD_DATE_\ at build time. Falls back to \package.json\ version and 'local'\ when env vars are absent.
  • *\docs/src/components/Footer.astro* — Subtle \ ext-xs text-surface-400\ line below the MIT/Astro line: \�{version} · {sha7} · {date}\
  • *\docs/src/env.d.ts* — TypeScript global declarations for the three injected constants.
  • *.github/workflows/squad-docs.yml* — \�nv:\ block on the build step passes \SQUAD_VERSION\ and \GITHUB_SHA\ so CI gets the real values.

Verification

\cd docs && npm run build\ passes locally with fallbacks (version reads \package.json, SHA shows \local).

Constraints met

  • Changes only in \docs/\ and .github/workflows/\
  • No .squad/\ files touched
  • Short SHA (first 7 chars via .slice(0,7))
  • Minimal code — 19 lines added total

Copilot AI added 3 commits March 23, 2026 10:21
- Inject __VERSION__, __COMMIT_SHA__, __BUILD_DATE__ via Vite define in astro.config.mjs
- Display v{version} · {sha7} · {date} in Footer.astro (xs muted text)
- Pass SQUAD_VERSION and GITHUB_SHA env vars in squad-docs.yml build step
- Add env.d.ts to declare globals for TypeScript

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Before: bradygaster.github.io/squad/docs/get-started/installation/ footer
After: Astro preview server with full CSS rendering

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 23, 2026

Updated Screenshots (correct URL + CSS)

Before — bradygaster.github.io/squad/docs/get-started/installation/ (footer)

Footer before

After — same page with version badge in footer

Footer after

Footer now shows version, short commit SHA, and build date. Renders correctly with full Tailwind CSS.

squad obo dina

Copilot AI added 2 commits March 23, 2026 10:38
Screenshots belong in PR comments, not committed to the branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Flight review: '0.9.1' hardcode would drift after next release.
Empty string lets the Vite define fall through to package.json.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit df68744 into bradygaster:dev Mar 23, 2026
2 checks passed
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.

3 participants