Harder Than it Should Be: Jekyll Word CountDecember 15th, 2015 • 189 words • filed under Programming
When I was running this site through WordPress, I had a plugin that would count the number of words each of my posts contained and give me some metrics. It was a pretty slick plugin and had all sorts of visuals.
With Jekyll, I don’t have such capabilities out of the box (or even remotely close to the box) so I went hunting for a plugin. I found one, and it works, but it’s slow, and I don’t really think there’s much that can be done about it. Given the static nature of Jekyll, it’s not really easy to save persistent information somewhere like in a database without also having a plugin for the database.
The plugin brought down my build to a crawl (140s over 13s) and GitHub didn’t whitelist the plugin, so it was pretty much a non-starter.
Needless to say, I pulled it, but if you want to see the commit where I added it, go here (then the subsequent commits here and here. Here’s where I pulled it).
For the record, before this post: 92,205 words. With this post: 92,392 words.