December Adventure

2025 edition

For all of December I’ll try to keep this page updated with project work I’m doing as part of December Adventure.

Last year I looked into CRDTs and made a small collaborative text editor (without any CRDTs!), see:

December Adventure 2024

For more on what December Adventure is, see https://eli.li/december-adventure

Entries

Jump to present

2025-12-01

A project I’ve been working on recently is a static site generator. The usecase is more general than my previous attempts at site generators and I think it’s quite nice to use. Since I’m nearing the end of this first bout of development, I asked some friends for feedback.

One of the suggestions I got (thanks lee!) was to make it easier to get started with by dumping out a complete example directly from the tool. So this morning I’ve been working a bit on making that example. I’m trying to keep it relatively barebones while still useful as a base that can be expanded on. I’m also trying to demonstrate some of the most useful patterns from the tool’s little kit of commands.

simple example page as a resource to bootstrap a new site

I think the internals of the example are shaping up nicely. The next thing I will do is bundle the directory of the example’s files inside the tool and make the tool spit it out when the quick start command is invoked.

For the next couple of days I think I want to explore this idea of the quick start command and make it so that it can be reshaped over time by the user. So that I could have different site templates I have made and embedded into the tool, any of which can be spit out on passing the name of one of the templates.

The command will use the current working directory as a default and accept a flag, --dst <dir> to specify another directory. I’ll include a mkdirp-like functionality so that the destination folder can be created at the same time if needed.


As a sidenote, I really like how decadv acts as a low-key writing prompt! I’m happily surprised I can effortlessly put out so many paragraphs in one go given the right context. While I usually don’t write longform project updates like this, I enjoy both the process and the result—especially when peeking back at things a few months or a year down the line.

2025-12-02

Short one today! Writing this log much later today than yesterday.

The quick start command is implemented! I named it new for simplicity. The naming also works for custom templates like new presentation, new docs etc. As part of working on this I discovered a bug in my crawling routine for recursively copying files. The crawl works by being given a directory to start in and a function to execute for each found file. I was missing a necessary path segment in the function I was passing. That’s rectified now which fixes an annoying bug I was having with copying over stylesheets. While working on this I was a bit worried that embedding a quick start template of multiple files would make the executable exceed my self-imposed vain limit of 1000kB. But thanks to the zipped structure and only using textfiles in the quick start example there’s basically no noticeable impact! I’ve got a cool 42 kB to spare.

Was reading some other logs and realized others were listing some things that they want to tackle, so I’ll do that too :)

2025-12-03

Starting the log earlier today. I want to work on the docs for the quick start and frontload them into the project README so that it feels easy to just get going. Also want to see about maybe breaking up the monolithic help when running --help. Explore some middleground with specific help sections, but still make unanticipated parts of the tool (like the embedded docs) discoverable.

Before getting back to the site gen stuff I’ll work a bit on revising an essay I’ve been writing. I had some feedback to make it more personal. Yesterday I spent a few hours editing it in that direction, now I want to try to read through it with fresher eyes and see what it’s like. Maybe there are some new edits I can make as a result of the change in direction, superfluous parts I can trim? We’ll see! In a little bit I’ll brew a couple cups of Longjing tea I bought last week while galivanting around town.


Okay! Essay revised and I wrote the quick start docs written! I brushed up the command a little bit as well. I added a couple of flags to make it less error-prone / intentional when using the command to output the example site but I’m not sure if I just compact them to a single flag instead:

# general structure for the `new` command:
./cli new --out <path/to/parent-dir> --dirname <dirname replacing default>

# e.g. to save the example in ~/code/sketches/website do:
./cli new --out ~/code/sketches --dirname website 

# if omitting --dirname, it is instead saved as the default name `new-site`
./cli new --out ~/code/sketches/new-site

Maybe it’s better to just check if basename(value of --out) exists? If the leaf path doesn’t exist, create the directory with the directory as-written. Otherwise if basename(value of --out) does exist, create directory new-site at <value of --out>/new-site to avoid dumping a bunch of files in an already populated directory.

While distracted earlier I did some research on the service idea I mentioned yesterday. I wanted to see what other projects exist in that area and understand how I can make something my own :) It took a while to go through my bookmarks but luckily I found a couple of references I knew I’d seen but had forgotten the names of.

2025-12-04

This morning I cleaned up the help section. Before I was dumping everything in a single go; it now presents a much cleaner first impression:

usage:
    # QUICKSTART

    ## write example site to dir `new-site`
    cli new 

    ## build site 
    cli --config new-site/conf.toml

    # HELP SECTIONS
    cli --help new                 more quickstart options
    cli --help config              flags for config mode
    cli --help standalone          flags for standalone mode
    cli --help docs                how to print the embedded documentation

    # VERSION
    cli --version

    # WARRANTY STATEMENT
    cli --warranty

Next up I’ll try to act on the notes I left yesterday, with using basename in a smart way.


That’s done now, too! cli new and cli new --out path/to/dir is all that’s needed. If path/to/dir exists, we create a subfolder. If it doesn’t exist, we put the new site in the final folder i.e. /dir. If new-site already exists, we exit early to avoid clobbering it.

Time for lunch. Steamed sweet potatoes, split pea falafel, arugula, a bit of sambal oelek and whatever scrapings of hummus I can scroung up.

Tomorrow I might want to revisit a site I built a little while back and add a bit of progressive enhancement / optional javascript. That site has two interactive elements which can be hidden individuall. As they are completely implemented in CSS, to remember state between page visits, a little bit of localStorage will be needed. A good task for a friday decadv and will be nice to have done :)