feat(posts): reading time from frontmatter and view counter #9
Loading…
Reference in a new issue
No description provided.
Delete branch "t3/blog-reading-time-view-counter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Each post sets its own reading time in its frontmatter, and every post shows a view count.
Reading time
5,5 minand5mall work.readingTime:, filled in with the current estimate so the site looks the same until you change the numbers.Views
POST /api/view/<slug>only accepts same-origin requests and slugs that exist. A per-IP limit of 30 requests a minute uses the Workers rate-limit binding./api/viewsafter it loads.Free tier
wrangler deploycreates the Durable Object (migrationv1) and theSTATS_LIMITERbinding.Verification
npx tsc --noEmitandgit diff --checkpass.wrangler dev:readingTime: 7 minset on a post, both the list and the post header showed7 min./api/viewsreturned the current counts.🤖 Generated with Claude Code
feat(posts): measured reading time and view counterto feat(posts): reading time from frontmatter and view counter