Celebrating New Year at the cabin! Looking forward to the new year, hoping it will be a good one!
Fireworks long since lost their magic for me, even though I still walk outside to view them at the midnight stroke. It just seems like one of these things which do not actually make sense once you think about it. Yes, pretty colours and bangs are nice, but no doubt tomorrow we shall read about all the eye injuries, the fires started, and the scared to death animals.
Wonderful times here at the cabin. Snow and good weather. I also
brought my computer so that I can work a bit. Yesterday I nixed the
development environment for my website, and reworked the
mkfile which builds and deploys it. I also separated out
the media files out of the git repo, so that they are no longer kept in
it.
Last day at the cabin, before heading back home.
Yesterday I spent some time getting an atom feed for this diary. I had been deliberating for a long time how to do this, since the entries are simply headers in the Markdown files. But I decided the easiet would be to create a custom Pandoc Writer. The site’s HTML is already generated using Pandoc, and so no additional tooling was needed. Just a Lua-script and a new mkfile target. Since the Atom generator was not an indepent package, I could have a very bespoke script, without worrying of making it work for any other purpose than my own. The only feature I added was an attribute for excluding entries from syndication:
## 2026-01-04, Sunday {#2026-01-04 syndicated=false}
This entry would not appear in the feed.There is something to be said of bespoke systems. We all love abstraction, and general solutions. But the power of programming is that one can make tailored solutions. We need the general tools, but we should also make the general tools programmable, so that we can extend them and adapt them to our purpose. Pandoc is such a great general tool. With filters and custom readers and writers is is perfect for systems that grow.
I am very happy about the result. I will also create an atom feed for
the rest of the pages on the site. But in that feed the default would be
for them to be unsyndicated, and syndicated=true in the
metadata header would publish them.
Another quality of life thing I did was to remove all large binary
files from the website repository. This used to waste around 15GB in
every working copy of the site. There is now a git ignored
media/ directory in my workdir, which has the same tree
structure as site-src/, but which is synced to a separate
central server location using rsync. The synchronisation is
hooked to git push and a commited manifest of hashes
connects commits to the state of the media files, ensuring that I can
deploy from any workstation without accedentally publishing the wrong
version of a binary file. So, any time I do mk deploy the
currently commited manifest is verified against the files pushed.
To test the website locally, there is a staging area, where I link in the media files mentioned in the deployment index. Thus, I get an accurate testing server on the workstation, before doing any actual deployment.
All in all, I hope the improvement made over the holidays should make working on the site a much smoother experience.
Expecting a comment section? Feel free to e-mail me your comments, or otherwise contact me to discuss the content of this site. See my contact info. You can also write your opinion on your own website, and link back here! ☺