"Hugo + GitLab Pages" is the way to go for building a Git-based Jamstack blog sites

If you are looking to build a free, serverless, Git-based Jamstack blog site, I recommend Hugo + GitLab Pages as the platform. I will explain why, comparing it to other leading static site generator/platform services.

Below are the components of the Git-based Jamstack service set. Here I compare the static site generator, which is the heart of Jamstack, and the Git/build/hosting platform services. Note that the optional dynamic content service is not included because I want to compare them as a basic platform.

Service architecture for serverless blogging environment : Components of Git-based Jamstack
Service architecture for serverless blogging environment : Components of Git-based Jamstack

Static site generator comparison

Compare the top four Site Generators - Jamstack.org.

SoftareNext.jsHugoGatsbyJekyll
GitHub star count182068573015242044171
Theme count231(unknown)126(414)231(112)325(459)
View frameworkReactGo templateReactLiquid
Build speed(256 pages)315.11s0.11s33.22s0.89s
Page load time suitability(LCP)425.8%70.3%41.2%76.4%
Layout collapse resistance(CLS)450.0%74.2%65.7%81.1%
Web resource size41838KB1025KB1739KB753KB
├ JS size746KB177KB645KB129KB
└ CSS size14KB29KB1KB23KB

Opinions may differ as to whether one prefers the clarity of template languages such as Go template and Liquid or the flexibility of programming frameworks such as React, but I think Hugo is the best for the following reasons.

  • Fast build.
    Build speed is very important, both to meet the build time limit set by the build container service and to quickly check the operation and preview submissions after view program changes.
  • High core web vitals (Google’s viewer experience index).
    Because it uses more CSS than JS, it can create a site with a high viewer UX, with faster page loading/display and less layout shifting after display.
  • A full range of themes are available.
    Even if you don’t know Go template, you can enjoy changing the look of your site by simply choosing your favorite theme.

Comparison of platform services for a serverless, Git-based Jamstack blogging environment

Git + Build + Hosting platform service comparison

This is an all-in-one platform service that allows you to build a stand-alone Git-based Jamstack blog site. Compare the two leading ones.

VenderGitHubGitLab
Product planFreeFree
Project typePagesPages
Git publicnessPublicPublic, Private
Git capacity limit1GB/repository5GB/repository(currently 10GB)
Git transfer limit(unknown)10GB/month
Build time limitUnlimited for public repository50000 minutes/month for public repository, 400 minutes/month for private repository
Build count limit10 times/hourUnlimited
Hosting capacity limit1GB/projectUnlimited within the project’s repository capacity
Hosting bandwidth limit100GB/monthUnlimited
Static site generator templateJekyllGatsby, Hugo, Jekyll, GitBook, Hexo etc.
Commercial useNot acceptableAcceptable

GitLab, which supports private repositories and provides templates for various static site generators, is easier for many people to use. Also, if you want to generate revenue through advertisements/affiliates, GitLab is safer for commercial use (advertisements/affiliates may be considered commercial).

Build + Hosting platform service comparison

A build+hosting-only platform service used in conjunction with another Git service. Compare the two leading ones.

VenderNetlifyVercel
Product planStarterHobby
Build time limit300 minutes/month6000 minutes/month
Build count limit(unknown)100 count/day
Hosting capacity limitUnlimited(unknown)
Hosting bandwidth limit100GB/month100GB/month
Commercial useAcceptableNot acceptable

Assuming no commercial use, Vercel has a build time of 6,000 minutes/month. In cases where GitLab Pages build time of 400 minutes/month is not enough, using Vercel in combination with GitLab Pages may be an option.

For a static site generator, Hugo has the fastest build speed and high core web vitality, and for a platform service, GitLab Pages supports private repositories and is safe for advertisements/affiliates, a combination that I think is necessary and sufficient.

The small build time of GitLab Pages is a concern, but it has not been a problem in my experience. When I spent 3 hours on weekdays and 8 hours on weekends for site renewal, the build time was about 250 minutes/month, which is 63% of the maximum build time of GitLab Pages.

Note that the build time varies greatly depending on the theme you use, because of different circumstances such as updating dependencies by git sub moddule, installing additional packages, calling PostCSS from Hugo, and so on. The 250 minutes/month above is based on using Docsy as the theme.

ThemeBeautiful HugoDocsy
Build time/times17s45s
├ Docker startup9s13s
├ Pull from Git1s13s
├ Hugo preparation1s11s
├ Hugo execution0s3s
├ Artifacts registration2s3s
├ Work area cleared1s1s
└ Others3s1s

  1. The number of GitHub stars is the value as of 2022/02/27. ↩︎

  2. Number of themes is the value of Jamstack Themes as of 2022/02/27. The numbers in parentheses indicate the number of themes registered at each official site. ↩︎

  3. Build speeds are from Comparing Static Site Generator Build Times. Note that this is the time for the static site generator only and is part of the range that the build container measures as build time (e.g., pull/launch Docker image for build, pull source from Git, launch static site generator…). ↩︎

  4. LCP/CLS/resource amounts, etc. from Jamstack - Web Almanac↩︎ ↩︎ ↩︎