1
1

README.md 1.7 KB

Link the About page's commit hash to the commit

Branch feature/commit-link · version 0.5.3

What changed

  • Linked hash: the About page's build hash, e.g. 0.5.3 (d2a387e), now links to that commit in Gogs. The link uses the full hash: https://git.monoexp.com/bajdev/posts/commit/<full hash>.
  • New repoURL setting: optional, in content/site.json, defaulting to https://git.monoexp.com/bajdev/posts. Anyone running a fork of the code can point the link at their own repo.
  • Dirty builds aren't linked. A binary built from uncommitted changes matches no commit, so it still shows (abc1234-dirty) as plain text. Pipeline builds always come from a clean checkout, so the live site always has the link.
  • README: documents repoURL.
  • Version: 0.5.3.

Notes

  • Since Phase 7, the live site is always built from the tip of main, so the link goes to the merge commit that's running.
  • The hash display is unchanged; only the link is new.

Testing

  • All tests pass with the race detector (go test -race ./...).
  • New test covering four cases: a clean build links the full hash, repoURL in site.json overrides the link, a dirty build shows -dirty with no link, and no commit at all shows the bare version.
  • Built from a clean local commit and checked the About page HTML: the link went to /commit/<full hash> of that build. Gogs commit URLs return 200 for the full hash.
About page
About page

Screenshots

From the branch's build running locally. The home page doesn't change.

Desktop Mobile
Desktop Mobile

🤖 Generated with Claude Code