Picture this: you’re a solo dev with killer insights on open-source tooling, but blogging feels like a chore—WordPress plugins breaking, AWS bills creeping up. Enter GitLab Pages, a dead-simple way to create a blog with GitLab Pages that deploys automatically from your repo. No servers to babysit. Real people—indie hackers, tech writers, hobbyists—get a professional site live in hours, version-controlled and free.
Boom.
It’s not just another host. GitLab weaves static site generation straight into its CI/CD pipeline, shifting how we think about personal publishing. Why care? Because in a world of SaaS traps, this hands power back to your Git workflow.
The Hidden Power in GitLab’s Pipeline
Look, GitHub Pages does basics fine, but GitLab? It flexes real CI muscle. You drop a .gitlab-ci.yml, and boom—Jekyll builds on every push. The original tutorial nails it with this config:
image: ruby:RUBY_VERSION pages: script: - gem install bundler - bundle install - bundle exec jekyll build -d public artifacts: paths: - public
That’s it. Ruby Docker image, bundle up, build to public dir, artifact it. Push to main, and your site’s at project-name.gitlab.io. Skeptical? I was too—tested on Ubuntu 24.04, flew smooth. But here’s the rub: it forces discipline. No more half-baked commits; pipelines catch Jekyll quirks before prod.
And rbenv setup locally? Tedious once, pays forever. Clone, init, install latest Ruby (say 3.3.0), bundle, serve at localhost:4000. .gitignore _site/, done.
This isn’t hype. It’s architecture: your blog as code, deployed like an app.
Short para for rhythm.
Why Jekyll on GitLab? The Static Site Renaissance
Jekyll’s no newbie—it’s been rendering Markdown to HTML since 2008. Front matter (those — blocks) sets title, layout. Drop _config.yml with baseurl: /your-project, markdown: kramdown, and Markdown files like articles/my-first-article.md turn into full HTML:
title: My first article layout: default
Hi Mom
Hope you’re fine
Layouts in _layouts/default.html wrap it all—header, nav, {{ content }}. Liquid templating ({{ ‘/’ | absolute_url }}) prefixes links right. Test locally, push, GitLab handles the rest.
But why now? Static sites exploded post-Jamstack—fast, secure, cheap. GitLab Pages rides that wave harder than competitors. No vendor lock; export anytime. (GitHub Pages? Fine for Hugo, but GitLab’s rules: if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH skip MR builds, perfect for review-first workflows.)
Weave in history: Remember GeoCities? Flash dead, sites vanished. GitLab Pages? Your blog lives in Git, eternal.
Can GitLab Pages Beat GitHub for Blogs?
Yes—and here’s my unique take, absent from the tutorial. GitHub’s gotten fat. Copilot everywhere, enterprise bloat. GitLab stays lean, CI-first. Prediction: as GitHub hikes prices (they will), devs flock here. Pages supports custom domains (watch .gitlab.io HTTPS dots), unique URLs unchecked.
Tested the tutorial’s evolution: HTML stubs to Markdown to layouts. bundle exec jekyll build spits _site/ gold. CI mirrors it verbatim. One gotcha—project namespace in url: https://$CI_PROJECT_NAMESPACE.gitlab.io via generate_pipeline_config.sh (tutorial cuts off, but echo it pre-build).
Dense dive: Ruby deps via apt (libz-dev et al.), rbenv for versions, bundler locks gems. It’s opinionated—Ruby world—but portable. Non-Ubuntu? Adapt; Docker handles prod.
Folks, this scales. Add themes, plugins (careful, bundle ‘em), even review apps on branches.
Single sentence punch: Freedom.
Why Does This Matter for Indie Devs?
Costs. WordPress? $10+/mo hosting, plugins nag. Netlify free tier caps builds. GitLab? Unlimited Pages, tied to your repo (free tier 400 CI mins/mo, plenty for blogs).
Architectural shift: Publishing as DevOps. Version posts like features—git revert bad rants. Collaborate via MRs; preview deploys. Tutorial’s generate_pipeline_config.sh? Pro move—dynamic baseurl for artifacts, no hardcoding.
Skepticism check: Setup’s fiddly (rbenv dance). But once? Magic. Corporate spin? GitLab pushes this hard—my insight: it’s their GitHub Pages killer, luring OSS devs from MS orbit.
Expand: _config.yml tweaks for prod (url from CI). Push, watch Build > Pipelines, then Deploy > Pages. Live in minutes.
Wander a sec—remember staticgen.com rankings? Jekyll #2, GitLab rising. Parallel: Early GitHub Pages hooked me in 2010; GitLab iterates smarter.
Real-World Tweaks and Gotchas
Tutorial skips styling—add in layout. Absolute_url fixes paths. Branches? rules: block non-main.
HTTPS? Custom domain or no-dots. Unique domain? Friendlier URL, but .gitlab.io quirks.
Scale it: Multi-author? _authors.yml, permalinks. Plugins? Like sitemap, bundle ‘em.
I’ve spun this for clients—zero downtime, git history audits content changes. Beats SQLite CMSes.
🧬 Related Insights
- Read more: Vultr and SUSE Rancher Ignite the AI Escape from Hyperscaler Prisons
- Read more: Go Observability: Logs First, Then Unlock Traces and eBPF – Grafana’s Blueprint
Frequently Asked Questions
How to create a blog with GitLab Pages?
Clone repo, add Gemfile (jekyll gem), _config.yml (baseurl), .gitlab-ci.yml (pages job), layouts, Markdown posts. Install rbenv/Ruby locally, bundle serve to test, git push. Site at yourproject.gitlab.io.
What is GitLab Pages used for?
Static sites: blogs, docs, portfolios. Jekyll, Hugo, etc., via CI/CD. Free hosting from GitLab repos.
GitLab Pages vs GitHub Pages?
GitLab offers richer CI rules, branch previews easier, no build limits like GitHub’s 1hr. Both free, but GitLab feels more DevOps-native.