From aa67c4551d2b3c7911207ac62ee06c24fe58846d Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Tue, 1 Sep 2026 17:03:37 -0700 Subject: [PATCH] feat: show commit SHA in footer with link to repo commit --- app/page.tsx | 10 ++++++++++ next.config.js | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/page.tsx b/app/page.tsx index 6f6042e..6b31bd4 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -140,6 +140,16 @@ export default function Home() { {t.footer.email}
+ diff --git a/next.config.js b/next.config.js index bff331f..5a6988b 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,14 @@ +const { execSync } = require('child_process'); + +const commitSha = process.env.COMMIT_SHA + || (() => { try { return execSync('git rev-parse --short HEAD').toString().trim(); } catch { return 'dev'; } })(); + /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', + env: { + NEXT_PUBLIC_COMMIT_SHA: commitSha, + }, }; module.exports = nextConfig; -// trigger ci 2026年 8月31日 星期一 17时28分38秒 PDT