This shall be my first proper post: a precursor to a proper colophon-style-explainer on how to replicate this site and its features like this inline-sidenote, for example .
The real intent of initialising this space is not too clear yet, but it will be intentional. Naturally, the audience is unknown for now, but at the least this space serves to be a mirror to myself.
What I do know, is that it’s time to write things down in order to wrangle various kinds of chaos.
Inspiration
I had sent this message to a close friend when trying to describe why starting a blog makes sense:
“I’m setting up a blogging system that works right out of my IDE.
Goal of it is to write random observations, add technical Today-I-Learnts (TILs) and maybe set up a photo-wall kinda thing.
Oh and the metric to optimise is the number keystrokes to write and publish thoughts. A text-first system that is as close to my daily workflows as possible.
It’s like when I got that camera attachment that sits on the bag strap, right, and that allowed me to take more and better photos because it made it convenient to reach to the camera. Same idea here. As little resistance as possible to inculcate that habit.”
In the future, I shall add in a telegram bot to ping life updates to family & friends since I will be far from home for some time. In that case, I should add in a proper photo gallery, an independent comments section, other fancy ho– cue scope creep…
Implementation
This shall be a brief description of how to set this up if the reader wishes to follow.
For folks that are more technically familiar
… or if you have an abundance of time and can afford to jump into multiple rabbit-holes
Choosing
a static site generatorHugoReason why Hugo
Frankly, anything works as long as it supports your commitment to the cause (writing). I chose Hugo because of the following reasons:
it’s a mature static site generator – mature means good documentation, decent plugin ecosystem and wonderful community discourse!
it lives up to its tagline of “fastest framework for building websites”.
Truth:
I didn’t investigate this, but a remote deployment takes ~10s and locally it’s instantly built – that’s fast enough for me to almost forget the build-quota that hosting platforms give.
it works well with org-mode!
I’m a big fan of
org modeand have been leaning onto it for most of my organisational tooling needs for the past 3 years or so. A tooling-focused post shall come in the near future, at least to pay homage to Emacs and the stellar community around it.
Wiring up an org-exporter –
ox-hugo:For most things, we tend to stand on the shoulders of giants.
@kaushalmodi’s exporter package, ox-hugo, can be used to integrate hugo into emacs. Great documentation to get from 0 to 1. His quickstart guide is pretty much all the meat that is needed for a no-frills setup.
Some comments on how this works
ox-hugois a plug-and-play exporter backend for org-mode.At this point, some brief reading on hugo will serve you well, to understand the roles and responsibilities of the site config vs other
.tomlfiles.The rough idea is that ox-hugo generates the markdown files, with relevant frontmatter that hugo can use to create feature-rich static sites. Different workflows for the org-mode side of things will work; multiple posts in a single file works well enough for me at this juncture.
Choosing a hosting solution and deploying it
All that remains now is to just host this somewhere.
My Choices
I chose netlify because their free tier works well enough. Usually for my own personal projects, I use fly.io but this works as well.
In the future, I would like to move away from using any hosting providers and self-hosting the bare-metal.
Need for tweaking the netlify config:
Generally, the config files do not require tweaking unless your project structure is abberant (I keep a private monorepo of org files, so some setup tinkering was needed to set the project base location correctly).
What might help is the use of env variables when deploying. Hugo captures env variables that get prefixed with
HUGO_*.1 2 3 4 5 6 7 8[build.environment] HUGO_VERSION = "0.150.0" HUGO_EXTENDED = "true" TZ = "Asia/Singapore" [build] publish = "public" command = "hugo --gc --minify"
For folks that are taking their first steps in the tech world…
At the moment, I don’t have a “one-click-zero-configuration” kind of solution. Netlify has a “Deploy to Netlify Button” that shows some promise here, to expose a template for others, maybe a separate template repo for learners will be helpful for this.
Emacs isn’t really a prerequisite for this setup. One can just use Hugo in its vanilla form, without any precursor medium.
(I’ll also get comments setup on this soon so that some FAQs can be gathered for this post)
In the Interim…
I think this maiden-post is on-brand with the spirit of what this space should be even though it’s an unfiltered stream of consciouness.
At the moment, I find myself at an inflection point as well, with an ambigous/uncertain future.
In the interim, here’s a quote that is inconveniently ambiguous for those in relatable situations…
“A giant looks in the mirror and sees nothing.”
Donda C. West (Kanye’s Mom)
