alunduil / alunduil/blog.alunduil.com
Dynamic features driven by per-post read counts
- Vorherrschende Sprache
- Astro
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 6 Std. 34 Min.
- Gemergte PRs (30 T.)
- 118
Beschreibung
## Goal
Use per-post read counts (sourced from #141) to add lightweight dynamic surfaces that help readers find what's resonating and give me a feedback loop on what's landing.
Blocked by #141 — needs an analytics source first.
## Candidate features
- **Popular posts widget** on the homepage / sidebar — top N by reads over a rolling window (e.g. last 90 days).
- **Per-post read counter** displayed near the title or in the meta block.
- **\"Trending now\"** — top N over a short window (e.g. last 7 days), only shown when a post crosses some threshold to avoid noise.
Pick one to ship first; the others can follow as separate PRs.
## Implementation sketch
Static site, so the data has to be baked at build time:
- Build step queries the Cloudflare GraphQL Analytics API for page-view counts per path.
- Result written to a JSON file under \`src/data/\` (or pulled directly via Astro content layer loader).
- Components read the JSON.
- Build runs daily via a scheduled workflow, or on every \`main\` push (latter is cheaper but staler between posts).
Token for the GraphQL API stored as a repo secret.
## Out of scope
- Real-time counts (would need client-side fetch; not worth the complexity for a personal blog).
- Scroll-depth-weighted rankings — see follow-up issue.
## Open questions
- Cadence: rebuild on push only, or also on a daily schedule?
- Recency window for \"popular\" — 90 days, all-time, or both?
- Display format for counts (exact, rounded, log-bucketed)?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.