Not-quite-announcement: this blog is not entirely dead
Posted on October 11, 2023 with tags life, tech. See the previous or next posts.
Hint: But also not far from it
Something, something then something else, and it’s been another six months since I last wrote anything. The world is crazy, somehow there’s no time for anything, and yet life move forward, inexorably. (Well, without going into gory side-notes about how evil stops life in various parts of the world.)
As a proof that this blog is not dead, I’ve finally implemented proper per-page keywords support, rather than the hard-coded keywords that were present before. Well, those defaults are still present in all pages that don’t declare keywords, will probably remove them at one point.
Implementing this in Hakyll is not hard, at all, if one semi-regularly writes code. There are a number of examples out there, but what was confusing:
- I haven’t written a bit of Haskell lately
- Hakyll is nice, but quirky, and I always forget how it works (on the Haskell level)
Anyway, after 2 files changed, 23 insertions(+), 8 deletions(-)
,
this page is the first one to have any keywords. And the funny thing,
after initially struggling to write a single line of Haskell, the
final version of the keywords is something like this:
…where renderKeywords =
return . escapeHtml . intercalate "," . map trim . splitAll ","
And I wrote that as is, compiled successfully, and did the right thing from the first try. I only write some Haskell code 2-3 times per year, but man, I love this language.
Until next time, hopefully before 2024 😅