DEV Community

Caleb Hearth
Caleb Hearth

Posted on • Originally published at calebhearth.com on

Statistics for My Blog

When thinking about how to kick off NaBloPoMo 2024 this past weekend, instead of picking one of several drafts or mostly written articles I naturally decided that we should instead start with something fresh!

Toward the end of 2023, inspired by and entirely ripping off Robb Knight’s Statistics page, I built out /statistics but entirely forgot to post about it1. This has definitely been true of several of the slashpages I’ve built out, so expect a few more posts about them in the coming days.

The page shows a live set of statistics generated from my database and crunched for you each time you reload. This is probably overkill and could be cached better, but I do have functionality to publish posts separately from code releases by post-dating them in the frontmatter. The code to generate the stats is pretty straightforward clocking in at a total of 17 lines of Ruby thanks to endless methods and numbered block params.

Read More

Top comments (0)