Create a blog with Clojure, nbb, and MarkDoc

submited by
Style Pass
2022-06-21 16:00:27

For me, scripting is the perfect middle ground when going from small book exercises to more significant projects while learning the language. I'd argue that a static site book is on the larger side of "scripting".

I am unsure if this even helps anyone. However, I would argue that I would probably not have done it if it wasn't for the step-by-step progress, with small course corrections along the way.

This post assumes that you are working with macOS. The dependencies should be simple to install for your operating system of choice. A POSIX-compliant shell for the scripts is required.

In the posts folder, create a new folder for each blog post. This approach has the benefit of co-locating every linked asset, such as images inside this folder.

Note that we import Node.js libraries with double quotes and Clojure libraries without quotes. nbb ships with quite a few helpful libraries for scripting. Take a look at the API documentation.

Leave a Comment