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 and Hugo, um, go, a step further. They have you write in a much more natural way, using 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:
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 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.
You can quickstart very.. quickly! There’s a bunch of themes you can pick from - I chose the one below.
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!
(*) You can get your own hostname and point it to your GitLab (or GitHub) site url for a nicer URL, for about $20/year