---
title: 🌮 Techo Tuesday 🌮 Make a free website - Static Site Generators and Hugo
date: 2019-09-10
type: post
featured: hugo.jpg#top
featuredcaption: this post source - in markdown
categories:
- technical
- techo tuesday
- coding
- website
tags:
- coding
- geek
- hugo
- markdown
comment:
---
_things turning me on this week_
_☕enjoy with a hot cupa java/script_
I'm now migrating off of WordPress and a paid web hosting plan,
to a free* website using **Hugo** and **GitLab**.
It nicely leverages **markdown** and makes posting content from an editor a breeze.
Your entire website is in a **git** repository -- so you can take your entire website anywhere and
have a full copy on your laptop (even with networking off). **No database**!
For me, suddenly writing felt more like _writing_ again - and I get to have full copies of everything (with any luck, the site should last forever..)
## Static Site Generators
Basically, instead of a server-side scripting language-based website (like PHP or python) - these kind of websites have you writing basic HTML. But versions like [Jekyll](https://jekyllrb.com/) and [Hugo](https://gohugo.io/), um, go, a step further. They have you write in a _much more natural_ way, using [MarkDown](https://en.wikipedia.org/wiki/Markdown).
They _get cute_ by having a 'production' step that prepares your site and does some light transforms of your pages into a new `/public/` subdir (that your pages serve from), converting markdown to HTML (AKA markup). It sums up your 'tags' and 'categories' and makes static simple pages based on them, eg: `/categories/coding/`. It uses your "number of posts per page" variable to auto-paginate and make static simple pages like: `/page/2/` or `/tags/biking/page/2/`.
They _also_ can get clever about user comments - allowing Discus or 'staticman' as ways to get comments into your site and onto your pages. I chose staticman because my code repository will get the comments (instead of being stored in some external service).
## Hugo
_huGO_
Hugo is a _blisteringly_ fast alternative to Jekyll, based on the superfast (and quite new) `Go` language (more like `C` language in terms of speed, statically typed, and compiled). My older brother suggested it after noting his similar blog of 10years+ of entries was taking _minutes_ to build in Jekyll - but seconds with Hugo.
## Setup Hugo
You can quickstart very.. quickly! There's a bunch of themes you can pick from - I chose the one below.
- https://gohugo.io/getting-started/quick-start/
- https://themes.gohugo.io/hugo-future-imperfect-slim/
## Deploy to the world
You can use GitLab or GitHub - I prefered GitLab because I use its build process at work and it has the quickest/easiest stup. They want your business, and will host it for free. You setup an account, and `git push` your laptop directory of files to them. Everything re-deploys automatically ever time you `git push` an update - easy!
- https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/
- https://about.gitlab.com/2016/04/07/gitlab-pages-setup/
(*) _You can get your own hostname and point it to your GitLab (or GitHub) site url for a nicer URL, for about $20/year_