Creating my own static website generator, one bite at a time.
I've planned to create my own blog to post about what I've learnt. Budget was my major blocker for so long, and I didn't created a local version. Last year, when I finally got extra budget I started to look up for alternatives to host my site.
My Software Engineering background helped and it was in my way at the same time. It helped me to decide to, as Scott Hanselman says, own my words, also helped me to decide to go for a static generated site, rather than SPA or wordpress. SPA, single page application, doesn't fit my purpose, the site will only show text, I don't plan to do any interaction, at least not at the begining. And Wordpress brings common vulnerabilities and a common target. It also helped me to narrow down domain registration and some basic knowledge required to host a site (domain, dns records security, certificates).
At the end the solution was going to be hosted using github + cloudflare, I didn't have a domain in mind to registered and I was also lacking how to genereat my site. This last part, the static site generation was my greater blocker, there are so many options that one can do, most of them are using Javascript and node, which adds to the learning curve and creates an alternative knoledge path to mantain.
As I've being writing code in Go, I decided to use Hugo I stayed stuck trying to figure out the good enough template, colors, trying to update my web-development knowledge after 5+ years of being away from it. Then I gave up. After changing computers I lost my two or three drafts, which was sad when I realized, and allow me to this time start from scratch.
A week ago, I finally got an idea for my domain, and this time I started with the process I have already decided: cloudflare for domain and deployment connected to github. To be fair I was also stuck by not having a clear domain and a lot of ideas to put it in a single site: learning, expression, photography portfolio. This time the domain name scped the site to be about learning, the rest can wait. Registering the site was a great wing, ironically within a few days I own 2 domains, the most polished site that is still in progress and this one, then I paused.
ailed.blog was born after I read a good article from someone I used to follow in Twitter? and seing the article was on a ".blog" domain, that was simple, someting mine a domain that can potentially host other parts that currently are left outside, then as I knew how to register a domain and the domain was available, the next step was to create a homepage for it. This page, simple, just HTML and a bit of style, a handcrafted file that will allow me to setup the deployment pipeline.
This site is ready and public, what I write to be published it's going to be on the internet. And the pure HTML setup proved to be difficult. Not sustainable, so for the other site I got back the idea to have it as a static generated site, where I can write in markdown and create the html version at build time.
I decided to generate the html files from markdown it on my own, changing the need to learn all the parts required on any particular existing tool, for the need to mantain some code. A side project that even if it locke me in Go, it can serve as a place to improve my developer skills.
Currently I'm focusing on creating a simple template and generate a single html file, from markdown files saved in a single directory. This will allow me to not get stuck, have small wins and start publishing, along the way I'll expand the functionalities, as it's needed or the curiosity to explore leads me.
This also means that my photography site will need to wait. Although I'm sure that when I'm ready to generate it my web development knowledge will be closer to where needs to be to bring that site to live, something that can showcase all the collections I own.
And that's the first bite, seems to be larger than I thought, as I'm still not able to show a coherent site there, but I'm getting closer. I also have already learning bits I want to write about:
Why learning bits? Elephant carpacio vs Burger for story spliting Why nil, or null, is not first citizen in Go My plan is to write "Why learning bits?" then finish the simple generation have the structure of this site and dinamically inject the article.