Fix reading time units
Fix time to read is marked done, but no page on production shows a reading time. The pipeline has a unit mismatch:
PageMeta.readingTimeis documented as "override in minutes"getPageInfo()returnssize: meta.readingTime ?? 0ReadingTime.sveltecomputesMath.ceil(info.size / 200), treating it as words, and hides itself whensizeis 0 — which it always is, because no page setsreadingTimerenderBlogPage()computes a realwordCountvia cheerio, but it only reaches the feed, notinfo
Tasks
- Decide the unit: expose
info.wordCount(from the renderer) andinfo.readingTime(minutes, override or derived) - Render minutes directly in
ReadingTime.svelte Intl.DurationFormatis only Baseline 2025; add a plain fallback string for older engines- Add a unit test for the minutes calculation
Read next
