cd ~

Welcome

Hello readers! This is a personal blog for me to document primarily technical content related to my work as a system administrator. Expect frequent content comprised of weird fixes, clever solutions, opinions, how tos, and maybe a bit of humour. Oh, and some occasional thoughts on board games…

This site is hosted on Gitlab Pages and was generated using Jekyll. The theme is no-style-please with some modifications. The documentation for Gitlab Pages and Jekyll is very complete and extensive so I won’t go in to the details of how to make a statically generated website; however, as someone who primarly works with python (hence parseltongue) and jinja2 for configuration management, I have to say that liquid templating is fairly wonky and limited.

For instance, one cannot simply loop over keys and values of a hash in liquid. Hashes are treated like arrays with the first element being the key and the last element being the data.


    # liquid hash
    {% for item in collection %}
        key={{ item|first }}
	value={{ item|last }}
    {% endfor %}

What’s particularily annoying here is that the value also needs to be iterated over in order to access the items if it’s also a hash. This results in a lot of nasty nested if statements and for loops for more complex data structures. Contrastly, other templating langages, such as jinja2, make this experience much simpler.


    # jinja2 dictionary
    {% for k,v in collection.iteritems() %}
        key={{ k }}
        value={{ v }}
    {% endfor %}

So, I guess the question is why use Jekyll? Well, I’m a system administrator and I’m lazy so I chose the simplest, best supported solution available to make this site. Since I’ve purposely chosen to use a simple design, and the site is statically generated, it fits my needs perfectly. I don’t think I’d be able to handle the frustration of using liquid for dynamic sites though!

As for Gitlab Pages, the experience so far seems rock solid. It’s easy to get a statically generated site with CI/CD up and running with little effort. And it’s free! Github offers a similar free site hosting service as well but I prefer Gitlab as a company from an ethical perspective (free software) so I decided to use their service instead.

Finally, I love how easy it is to integrate Let’s Encrypt on Gitlab. After you setup your custom domain, all you have to do is click a checkbox. It’s pure KISS and I love it.

Never trust a snake