diff --git a/website/public/styles/global.css b/website/public/styles/global.css index 81f598c7..ddd77c9c 100644 --- a/website/public/styles/global.css +++ b/website/public/styles/global.css @@ -688,6 +688,12 @@ a:hover { color: var(--color-accent); } +.site-footer .build-info { + margin-top: 8px; + font-size: 12px; + opacity: 0.7; +} + /* Buttons */ .btn { display: inline-flex; diff --git a/website/src/layouts/BaseLayout.astro b/website/src/layouts/BaseLayout.astro index a8bc2b5c..74ebf201 100644 --- a/website/src/layouts/BaseLayout.astro +++ b/website/src/layouts/BaseLayout.astro @@ -1,4 +1,6 @@ --- +import { execSync } from "child_process"; + interface Props { title: string; description?: string; @@ -11,6 +13,21 @@ const { activeNav = "", } = Astro.props; const base = import.meta.env.BASE_URL; + +// Get git commit SHA and build date at build time +let commitSha = "unknown"; +let buildDate = new Date().toISOString().split("T")[0]; +try { + // Use GITHUB_SHA env var in GitHub Actions, fallback to git command locally + const githubSha = process.env.GITHUB_SHA; + if (githubSha) { + commitSha = githubSha.substring(0, 7); + } else { + commitSha = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim(); + } +} catch { + // Fallback if git is not available +} --- @@ -155,6 +172,13 @@ const base = import.meta.env.BASE_URL; rel="noopener">MIT License

+

+ Built from {commitSha} on {buildDate} +