Blogging with Gitlab
About a week ago, I figured out how to use Hugo, first with Caddy and then with Dropbox and Gitlab. Hugo + Gitlab in particular is an amazing combo because it’s so easy to set up and run with:
- Create an account on Gitlab
- Fork this repo: https://gitlab.com/pages/hugo
- Import a theme of your choice
- Update settings in config.toml and social.toml
- THAT’S IT.
No code. Working on it has been a hoot as well. I use Atom to compose my posts (I was able to create a macro that made it easier for me to populate the front-matter while the Markdown Preview package recreates Ghost’s writing environment very well) and Cycligent to commit. Granted, this adds two more steps to the shortest publishing process (headline, body, tags, publish) but I don’t mind losing the extra 30 seconds.
And just like that, most of Ghost’s principal features are taken care of:
- Markdown + live preview
- Content tagging
- Team sites
- Scheduled publishing
- SEO and social integration (with Cloudflare Apps)
- HTTPS (either with Cloudflare or Let’s Encrypt)
- RSS and integrations (Slack, etc.)
- Email subscriptions (with MailChimp)
- Open-source access
- Theme-editing
(Not sure a CDN is necessary with static sites but if you’d like one, Cloudflare’s is pretty good.)
What’s not taken care of: backups. Although I’m sure there’s a way, e.g. by firing up your page on Gitlab CE hosted on a VPS or syncing your repo with a local copy once in a while. Best part (if you take the latter option): zero cost for the entire thing. Gitlab caps repo sizes at 10 GB, which is amazing – potentially humungous if you host your images elsewhere and import them by URL. Plus Gitlab also takes care of the security, continuous integration/delivery, etc.
All of this has made me curious about where an entity like Ghost has left to go in its efforts to simplify the publishing process, etc. Ghost made sense in a world where WordPress was crowded, other CMSs were going to be as niche/unaffordable as they are and SSGs came with a non-gentle learning curve. However, Gitlab makes it dead-easy to run with an SSG like Hugo. If someone created a GUI for Hugo like they did with Cactus (now defunct), it would – as they say – “just work”. Hell, if Bitnami releases a Hugo (or Octopress) stack soon for Lightsail, Ghost might have nothing else to do but stick to its journalism plan.
Featured image credit: Snufkin/pixabay.