Serve: the ugliest static site generator in the world
I don’t know what’s been up with me lately but I do know that during the last couple of weeks I’ve “shipped” a lot of things. I mean, most of them are basic things but I’ve had fun while doing them. So yesterday I added yet another repo to my GitHub account, Serve. Serve is a static site generator which focuses on generating small sites that only need to consist of a few pages at the most.
The process
It started with an faint idea. I wanted to build something useful that could parse a couple of Markdown files and convert them to static HTML files. It’s no secret that I absolutely adore Jekyll, but I tend to roll with an idea once I get it. I first threw together a one file script that had the same basic functionality and went from there. My goal was to really learn how to use modules and classes since I’ve mostly shied away from them1.
I looked at a lot of different projects on GitHub but to be honest I couldn’t really comprehend everything, since I’m still pretty inexperienced when it comes to Ruby and programming languages in general. I didn’t just want to give up though. I was going to finish my newly started projects goddamnit, even if it would take me months.
It suddenly clicked for me and I finally got “it”2, which is such an amazing feeling. It didn’t take too long for me to transform the ugly script into it’s current state. I’m not saying it’s perfect but it looks a hell of a lot nicer then it did when I started and it sort of keeps me excited to continue to learn.
TL;DR: Learning stuff is awesome, especially when you notice your own progress.
-
I’ve of course read about them and have an basic understanding of their purpose but actually seeing them in action and implementing them is so much better for my learning experience. ↩
-
With “it” I mean how to use them to get them to work with the rest of the code. “Inheritance!” was literally the thing that popped up in my head that made me understand everything. It’s funny how the brain works sometimes. ↩