the devblog

the devblog

Adding a second page

There is no point in premature generalisation and abstraction of code.

I will add a second (and maybe a third) page to the site before beggining to create abstreactions.

The abstractions I have in mind currently are mostly about presenting content in different ways e.g. different preview-widgets, pagination, abrreviated articles

Organizing the webpage in subfolders. Adding unit tests.

When the files of the are organized in paths, pathes to resources like css files need to be relative. At least if I am not missing something.

With this change I added the first unit test. Michiel Borkent wrote about running unit tests with babashka in his blog back in 2022. I'm following his advice and use cognitect's test runner. I guess I will find something more streamlined in the future

The command bb test:bb will do the trick.

while at it, I also added bb clean. bb -m generate still creates the html output.

All looks better with CSS

A simple css file was added.

Also I tried to organize the code to implement a good separation of concerns. In a later step the namespace devblog.clj may become pure config.

A second page emerges

The contents of the little devblog are now only preview on the homepage. Click on 'more' to see it all.

Also I tried to organize the code to implement a good separation of concerns. In a later step the namespace devblog.clj may become pure config.

The devblog goes live

The Devblog enters the hompage. Currently hand-typed hiccup and a manual deployment is all I have. This may or may not change in the future.

Cursive and babashka

Setting up Cursive with babashka is documented at cursive-ide.com.

I added a deps.edn next to the bb.edn to make it work. Without it idea would not identify the source root properly. According to the babashka book you would only need to do that when creating a library. For the moment I will accept having both bb.edn and deps.edn.

Getting started with babashka is easy

Setup of a new babashka project is trivial. See Chapter 4 "Project Setup" in the babashka book.

The setup of this page can be found at codeberg.org/stammi/monospaced