Are you someone who scribbles annotations in book margins? Or do you regard that as an unthinkable defilement? For me, it's the latter; I couldn't bring myself to write in a book, or even to dog-ear any page to mark an interesting paragraph. So instead, I stick notes or jot some comments down somewhere else, but I inevitably lose track and curse myself for not keeping things tidier. This may be familiar to some of you.
I've also tried to keep software recipes and tricks of the trade in a wiki, which works well to build a personal reference but is not appropriate for sharing opinions and discussing subjects. It would be too chaotic.
It was time to try something else, and this is what you are reading now: a blog.
Topics
'A blog on what?' you may ask.
The themes will mainly be related to software development and to the Rust language.
One purpose of the blog is to share and even exchange little recipes, methods and idioms that are part of the journey when learning a new language, but that you don't usually find in tutorials and programming books. We all experience this phase when we wonder, after digesting the theory, how to do what seemed so natural in another language. 'How can I write a builder? I believed I had it right, but the compiler says "temporary value dropped while borrowed"...' Rather than keeping that on a sticky note, it would be more helpful to put the solution online for others.
Another purpose is to share thoughts on the language and allow everyone to give their point of view.
What You Should Know
You need a GitHub account if you want to post comments. By the way, I noticed that it was not possible to edit comments from the blog, but it is possible if you open the corresponding issue on GitHub. To find it, just click on the link commented ... ago
above your comment, or on ... Comments
at the top.
I will keep another issue open, blog posts, that I will update after each new post so that you can subscribe to it and receive notifications. If that's too cumbersome or not enough, I will try to provide an RSS feed.
The same repository hosts the source code of the blog — don't hesitate to fork it or copy parts of it. I would only ask you to change the theme to make it look different if you intend to use it publicly.
It's a Work in Progress
Famous last words, but I don't want to get too distracted and designing websites is not my area of expertise, so the remaining changes to the blog will be limited to small additions:
- a light theme and a switch between dark & light, maybe a third option to match the OS preference
- improving the syntax highlighting
- a search function
- (maybe) a copy button for the code blocks
- (maybe) support for feeds, though I'm not sure anyone is still using it.
The Blog's Insides
This blog has been made with Zola, but it took a few hops to get there.
Hosting the site with GitHub Pages quickly became the obvious choice, because I wanted to keep it simple — I didn't need a database or anything dynamic — and GitHub would already provide the versioning of the sources. As a bonus, it also provides automatic flows to build the HTML from a more convenient language such as Markdown or AsciiDoc.
Next came the question of the static site generator (SSG).
GitHub Pages comes with Jekyll, so at first it seemed to be the natural candidate. But I needed to generate a local version of the site first, to see the result and be able to iterate without going through the GitHub flow every time. Then I was hoping for a possible option to fix any problem I might encounter with the framework. Unfortunately, Jekyll is written in Ruby which I don't know much, and frankly, which I don't like much. But what dissuaded me was the realization that GitHub was using an old version of Jekyll and was unlikely to update soon. This meant I had to install the same old version on my system, and that it could still be different due to possible custom tweaks in the GitHub's version. That didn't inspire confidence, especially since there was little documentation on GitHub concerning its integration into their automatic flow.
Generating the site manually wasn't a problem since I was going to do it locally anyway, and it would allow me to use another generator that I would feel more comfortable with. Hugo had already caught my eye because it's a well-known generator that has a large community and gives good results. For instance, a theme like Loveit has a lot to offer. However, the framework proved to be more complex than what I needed, and it's written in Go — another language I don't know well. A few posts like this one convinced me to look for a simpler solution.
Zola was my next candidate. By comparison, I preferred its template language, which is similar to Django's syntax. This framework also happens to be written in Rust, which I found appropriate. It looked fast, stable and offered more than enough to accommodate my simple blog, so after a few conclusive tests, I finally settled on that engine.
The theme is home-made. Well, almost entirely. I've taken the original nyx-bold syntax highlighting and adapted the colours, then integrated the very helpful utterances plugin that uses the GitHub issues to host comments. With a focus on software development, it seemed more relevant than Disqus or another system that may require users to create an additional login. Finally, there are a couple of Google fonts.
I hope you enjoy the result. Many thanks to the creators and contributors of Zola, Tera, Hugo, Jekyll, utterances, Django, and all the others for making life easier to blog and site creators! Without them, more of us would still be shedding sticky notes.
Note: You can comment below using utteranc.es (requires your authorization the first time), or directly on GitHub.