Home » Software Development » Static Site Generator Shootout – JBake vs Jekyll

About Peter Backx

Peter Backx

Static Site Generator Shootout – JBake vs Jekyll

Earlier this year, I’ve been experimenting with static site generators. My eventual goal is to move this blog and a few more into static sites. After some experimentation, my conclusions are pretty predictable.

Ask any one what software to use if you want to run a blog. Most people will suggest WordPress right away.

For the longest time, I’ve also done so. It has a huge community with a plugin for everything you can think of. I run four sites on WordPress. Some popular, some not so much.

Last year I started to change my mind about WordPress as the default choice. If any of my sites gets the least bit of traffic, my host will start to complain because of excessive resource usage. Shared hosts are notoriously aggressive in shutting down sites that demand too many of their servers, but they have a point.

Small impression of my shared host’s server whenever I publish something popular.

Small impression of my shared host’s server whenever I publish something popular.

WordPress is not designed to serve a lot of traffic. Out-of-the-box, WordPress is a fully dynamic site and requires a lot of tweaking to perform acceptable.

On top of that, WordPress is a prime target for all kinds of attacks by script kiddies who just want to have fun. Not only do you need to update ASAP if a security patch comes out, but there are numerous ways some one can launch a successful denial-of-service attack on your site.

There is a much simpler solution: don’t use any dynamic code that requires server resources. Create all your HTML pages offline and don’t run any code to serve them to your customers.

Enter: static site generators.

A static site generator takes a general site layout and plain text content and merges everything into a nice package of static JavaScript, CSS and HTML pages. No need to have anything running on the server, except for the bare minimal highly optimized web server.

I’ve taken a look at two static site generators:

  • Jekyll. It’s the one every one is using.
  • JBake. It wants to be Jekyll, but written in Java.

5 reasons to use JBake

Bake your site with JBake

Bake your site with JBake

I’ve used JBake to create and host a small personal site. The site has been running for half a year without issue. It responds about a 100 times quicker then any of my WordPress sites. It hasn’t received too many content updates, because I haven’t configured a good automated deployment process.

It was easy to get started, but it does require a bit of work to get everything going.

Most importantly, there are no themes available, so you’re on your own. At least, you were, here’s one that I made and that you can use.

Reasons why I’d use JBake again:

  1. It’s written in Java. If Java is your primary programming language, this is going to be the main reason for using JBake
  2. It doesn’t have any bells and whistles, but it does everything you need.
  3. The code is minimal and readable, so you can extend it easily.
  4. If you like the underdog, JBake is perfect.
  5. Euhm… Did I already say it’s written in Java?

5 reasons to use Jekyll

jekyll-logo-300x139I haven’t deployed any sites with Jekyll yet, but I’m working on converting this site.

Reasons why I’m using it:

  1. Every one uses it. The documentation is clear, but even if you have an issue, you can just Google it.
  2. There are a lot of premade themes available.
  3. If you want extra functionality, there’s probably already a plugin for that.
  4. You can host it on GitHub for free (with some limitations)
  5. There are many ways to easily deploy your site to various other hosting options.
  6. Ok, one more: You can automatically convert existing WordPress sites.

Conclusion

I see no reason why you would make your life difficult. Just go with Jekyll. Unless you really, really want to know the ins and outs of a site generator and you only know Java and don’t want to learn the slightest bit of Ruby.

(0 rating, 0 votes)
You need to be a registered member to rate this.
3 Comments Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Shai Almog
5 years ago

We decided to go with JBake after trying Jekyll and several other static translators. Unlike you we didn’t have a wordpress site to convert so the import didn’t matter much. I tried most of the import wizards and tools for existing static converters and found them lacking. It took us a couple of days to create a rather elaborate but highly maintainable static site (codenameone.com), since we use Java JBake was just the most intuitive for us and “just worked”. The gems for Jekyll failed to install with obscure error messages that might be clear to ruby guys but totally… Read more »

Peter Backx
5 years ago

Hey Shai, thanks for the comment.
You’re absolutely right. JBake is a good choice if you want to stay in the Java ecosystem.

As far as JSP is concerned. It’s not easy. I wasn’t aware of this until you mentioned it, but apparently there’s no easy way to render JSP files “offline”. You could try this trick: http://stackoverflow.com/a/8144496/227081

Peter

Ondřej Žižka
3 years ago

Thank you for persuading me to check JBake. There’s so many generators, but most of them are too simple or just bad. JBake is a good start. I like how you stress “It’s written in Java” as a big plus :) I see it the same way. When I –installed– tried to install Jekyll, it started throwing gem inconsistency at me. I spent about two hours trying to fix. After that I used some Docker image. Then tried the thing, and I wasn’t too satisfied – for me, it was too chaotic. Which is common for Ruby project. So I… Read more »