Johnathan.org

Johnathan.org • A technology blog produced by Johnathan Lyman covering a variety of tutorials, thoughts, and commentary on all of the technology around us.

Harder Than it Should Be: Jekyll Word Count

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.

Enjoying these posts? Subscribe for more
Subscribe now

Subscribe to be notified of new content and support Johnathan.org! You'll be a part of the community and no longer see ads.

You've successfully subscribed to Johnathan.org
Great! Next, complete checkout for full access to Johnathan.org
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.