Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Would you like to code in JavaScript? Thereâs Next.jsÂč and GatsbyÂČ among the most popular ones. You like to write in Go? HugoÂł would be the best option for you.
If Ruby is the language of your choice you should probably go with Jekyll⎠or Middlemanâ”. You can explore the whole list of 458 static site generators hereâ¶. More enjoyable version of the list hereâ·.
With the sheer number of options available, choosing one will be a tough nut to crack. In this article, Iâd like to go through some of the most popular options and help you make the best decision for your project.
Jekyll
This Static Site Generator is built on top of Ruby. The first version on Github was released in 2009, making it the oldest SSG from the top 4 that Iâm describing in this article. Jekyll is also the engine behind GitHub Pages which explains why itâs the most popular option right now.
Jekyllâs popularity on GitHub over time:
The biggest advantage Jekyll has over other SSGs is itâs simplicity. You donât have to put in a lot of effort to set up a simple blog-aware website.
Jekyll Pros đ:
đ Simplicity
Itâs very simple and fast to set up and deploy your site on Github Pages as they fit well together.
đ Huge community
What means a plethora of tutorials thatâll show you how to get started. Youâll also for sure find support as you face some difficulties.
đ Liquid templating engine
If youâre coming from the most popular CMS options available on the market, like WordPress, you should feel well with Liquid templating structure.
đ A whole lot of available open-source plugins
In most cases youâd like to do more with your websites than just generate static files. Thatâs when the long list of Jekyll plugins comes to help you.
Jekyll Cons đ:
đ Ruby environment needed
It might be a tough nut to crack, especially for Windows users since itâs not officially supported by Jekyll.
đ Building time
Plugins availability can be a Con as well. If youâll use a couple of it then itâll definitely slow down your building process.
Hugo
Hugoâs first release came out in the second half of 2014. Itâs powered by Go programming language aka. Golangâž. Hugoâs general structure is very similar to the one offered by Jekyll. Itâs really important to mention that Hugo is unbeatable when it comes down to building times. It turns out that Hugo can be as much as 63 times faster than Jekyll when handling big amounts of postsâč!
Hugoâs popularity on GitHub over time:
Hugo Pros đ:
đ Incredible fast building
Hugo is unbeatable when it comes down to building times. I personally donât know any faster Static Site Generator than Hugo, which makes it great choice for big websites.
đ Flexible
You donât have to search and install any plugins since Hugo supports multiple content types alone.
đ Cross-platform
Hugo has binaries for Windows, Linux, FreeBSD, NetBSD, macOS, and Android for x64, i386 and ARM architectures.
Hugo Cons đ:
đ Golang Syntax
Go language is definitely not the most popular programming language so you may have some difficulties with Hugoâs syntax at the beginning.
đ No built-in asset processing
Thereâs no asset pipeline built into Hugo, so you have to use external tools.
Next.js
The first version of Next.js was released on October 26th, 2016 which makes it the youngest contender in this article. Even though itâs popularity has been rising insanely fast, it may be a little bit concerning for some that Next.js is not a pure Static Site Generator, but can be used as one. So what exactly is Next.js? In a nutshell: itâs a framework for server-rendered or statically-exported JavaScript applications.
Next.jsâs popularity on GitHub over time:
Next.js Pros đ:
đ Single Page App feeling
Since Next.js is built on top of React.js it brings to it all the advantages React has like pre-fetching and JSX template system to name a few.
đ Automatic Code Splitting
Pages never load unnecessary code.
đ Great learning materials
If youâre not familiar with building Single Page Applications you can get started very fast hereÂčâ°.
đ You can jump to full PWAÂ anytime
If static page is no more sufficient, you can enable Node.js server.
Next.js Cons đ:
đ Learning curve
Comparing to what youâve to learn going the Jekyll/Hugo way itâs a lot harder to jump into Next.js if youâre totally green with React, JS, JSXÂ etc.
đ Static page building time
Itâs hard to beat Hugo in this area. Building time for large websites could be pretty long.
Gatsby
Gatsbyâs first release took place on October 6th, 2015. Itâs worth mentioning that it has one of the most active communities of all the Static Site Generator projectsâââ807 contributors as of right now. To cut a long story short, Gatsby is a static Progressive Web App generator.
Gatsbyâs popularity on GitHub over time:
Gatsbyâs Pros đ:
đ GraphQLÂ inside
Data directly into our componentsâââin the shape and form we want. GraphQL is pretty big topic, you can read more about it here.
đ PWA by default
You donât have to put much effort to turn your Gatsby static website into offline available app. Setting up Gatsby service workers is as easy as pie! Just one gatsby-plugin.
đ Growing plugin ecosystem
There are dozens of plugins, you can easily connect most popular Headless CMS, Google Analytics, image optimization, service workers and more!ÂčÂč
đ Data & code prefetching
Site would feel like a single page app while still benefiting from the performance of a static site.
đ Great community and learning materials
Itâs easy to get started with Gatsbyâs step by step tutorial available hereÂčÂČ
Gatsbyâs Cons đ:
đ Learning curve
JS, React, GraphQL.
đ Long building times
Comparing to all of the above Static Site Generators it takes Gatsby a lot time to throw out the files after you hit the build command.
Summary
This is what we learned so far by using Static Site Generators at Bejamas. Let me wrap things up a little bit at the end:
If youâre seeking simplicity and pretty short learning curveâââyou better go with Jekyll. Building a big site, want to change and add a whole lot of new posts? Choose Hugo. In any other cases, Iâd suggest you to go with Gatsby or Next.js.
Why? Because javascript is eating the web development world. If youâre fresh in this field and looking for something that has a big community, is trending and has a good outlook for the futureâââyou should definitely go with the last two frameworks described in this article.
That are just my thoughts though. What you think of it? Are there any pros or cons that I didnât bring to the table?
This article was originally posted on our company website: https://bejamas.io/blog/guide-into-static-site-generators/
Footnotes
- https://nextjs.org/
- https://www.gatsbyjs.org/
- http://gohugo.io/
- https://jekyllrb.com/
- https://middlemanapp.com/
- https://staticsitegenerators.net/
- https://www.staticgen.com/
- https://en.wikipedia.org/wiki/Go_(programming_language)
- https://forestry.io/blog/hugo-vs-jekyll-benchmark/
- https://nextjs.org/learn/
- https://www.gatsbyjs.org/plugins/
- https://www.gatsbyjs.org/tutorial/
Guide into Static Site Generators was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.