[object Object]

← back to build-pages

p/:slug: per-project velocity (last 24h + last 7d) in meta line

982149f7b73fa3f53523cacdc624ca811168c749 · 2026-05-13 17:15:45 -0700 · SteveStudio2

Files touched

Diff

commit 982149f7b73fa3f53523cacdc624ca811168c749
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Wed May 13 17:15:45 2026 -0700

    p/:slug: per-project velocity (last 24h + last 7d) in meta line
---
 server.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 80fb00a..7d3a03c 100644
--- a/server.js
+++ b/server.js
@@ -503,7 +503,16 @@ app.get('/p/:slug', async (req, res, next) => {
       <script type="application/ld+json">${JSON.stringify(projectJsonld)}</script>
       <h1>${esc(p.name)}</h1>
       <p class="bp-lede">${esc(p.blurb)}</p>
-      <p class="bp-meta">repo: <code>${esc(p.repo.replace(HOME, '~'))}</code> · ${commits.length} commits</p>
+      <p class="bp-meta">repo: <code>${esc(p.repo.replace(HOME, '~'))}</code> · ${commits.length} commits · ${(() => {
+        const now = Date.now(), dayMs = 86400000;
+        let d24 = 0, d7 = 0;
+        for (const c of commits) {
+          const age = now - new Date(c.dateISO).getTime();
+          if (age < dayMs) d24++;
+          if (age < 7 * dayMs) d7++;
+        }
+        return `<strong>${d24}</strong> in last 24h, <strong>${d7}</strong> in last 7d`;
+      })()}</p>
 
       <section class="bp-section">
         <h2>Search the build</h2>

← ba6940a api: /api/fleet/velocity — rolling-window commit counts (las  ·  back to build-pages  ·  api: /api/fleet/all one-shot aggregate (projects + velocity b6ddd07 →