Why use Jekyll?
01 Jun 2016
If you’re reading this, you’ve probably already heard about Jekyll. Perhaps you think its only for ultra-nerds, hipster bloggers and masochistic developers.
But I believe there are several genuine reasons why using Jekyll is a viable option. I’m going to tell you why:
- Better site security
- Better experience for developers
- Faster load times
Static webpages are inherently more secure than their dynamic counterparts. Most CMS’s like WordPress are built on SQL databases. This means there are many points of attack for spammers and hackers out to destroy your site.
If a site is not regularly maintained and monitored, an SQL injection can easily go unnoticed and provide backlinks to all sorts of nefarious online activities (and ruin your site’s credibility)
This 3y.o. WordPress site I had to fix for a client was riddled with backlinks pointing to sites selling viagra, perscription drugs, pornography, knockoff goods and worse
As a static website generator, Jekyll is immune to this sort of thing, because there is no interaction with a database.
That doesn’t mean Jekyll sites are doomed to be boring though. It’s easy to outsource many parts that usually require a database to a third party – such as Disqus (for comments) or Formspree (for forms).
If you make a website using Jekyll, you could make it, forget it, come back in 10 years and expect nothing to have been defaced or changed.
Better for developers
WordPress comes with a lot of overhead, whilst Jekyll is remarkably simple. You don’t have to have a PhD in PHP to understand the inner workings of the Jekyll system. I guarantee that within a few days of making your first Jekyll site, you’ll understand everything. Learning WordPress on the other hand can take quite some time. For some developers, trading in a UI for simplicity is a good deal.
With Jekyll, you spend less time learning a system and more time just getting stuff done.
Oh – did I mention that Jekyll comes with its own built-in local server? Forget your XAMPs, WAMPs and tediously recreating databases every time you want to move a site. All you need are two words in the command line:
Since a Jekyll site is just a bunch of HTML, CSS and JS files – it means that moving, restoring and backing up a Jekyll site is just a matter copy and paste. Migrating servers doesn’t have to be a nightmare.
Faster load times
Someone smarter than me can better explain why static sites are faster than dynamic ones. But the long and short of it is – less workload for your server. A dynamic site has to be built for every individual who visits and that limits the ability to cache stuff. The same server, with a static site could therefore withstand a much higher load.
Why should you care?
Well - what if your site takes off and gets a thousand hits in an hour? What if people get bored waiting 15 seconds for the page to load, and don’t read your witty and well constructed blog post? What if your readers are in a different country to your server? What if they’re using crappy data connections? I think you get the idea…
That also works out to cheaper hosting costs due to lower demand on system resources. You could easily put several static sites on a $5 DigitalOcean droplet without breaking a sweat. Or what about free hosting with GitHub pages?! Snap.
This brings me onto my final point – SEO. You should know that page load time is a really important metric for SEO. Decreased load time means a lower bounce rate and brownie points from Google for being faster than the competition. In the SEO game, every little helps.
“But what about my SEO WP pluginz?!” did you say? Actually, it’s not that hard to do in Jekyll. Here’s a link that explains how.
There are many, many, many situations where Jekyll is an inappropriate solution.
It would be insanity to suggest that someone with no coding experience should use Jekyll. I’ve read arguments saying that markdown is super easy to learn, but the reality is, most people will be dribbling from the corner of their mouth before you can finish your sentence.
Tuck those clients in with a nice warm WordPress installation and don’t think twice about it.
Don’t forget that there are many other static site generators out there. The above points should hold true for those too.
If you’re a developer – learning or otherwise – it’s well worth having a go with Jekyll, I’ve no doubt you’ll learn a ton.
Thanks for reading!
Feel free to hurl abuse at me, or just say hi on Twitter @codestub