I added live stats badges to gitstats, and here's how they work without a badge server
说明与用途
Gitstats 添加了实时统计徽章,直接与静态报告一起生成,无需单独的徽章服务器,使仓库活动在 README 中可见。
问题
Gitstats reports are static and not easily discoverable; README badges lack repository activity metrics like commit count, last commit date, and contributor count.
结果
Gitstats now provides live, up-to-date badges directly from static reports, eliminating the need for a separate badge server and making repository activity visible in README files.
工作流
- Generate report with gitstats (v2.6.0) which creates badge.svg and badges/ directory with pre-rendered metrics.
- Configure badge appearance via gitstats config keys (badge_metric, badge_color, badge_style).
- Deploy report to static hosting (e.g., GitHub Pages) using gitstats-action or manual upload.
- Add badge markdown to README: .
- Optionally expose metrics via shields.io endpoint using badges/
<metric>.json for advanced styling.
证据
Every report gets a badge.svg written next to index.html
Because it's regenerated with the report, the number is never stale.
The gitstats README now carries its own badge, served from the demo report
- 记录日期: 2026-09-08T09:32:34.623Z