Lichendust

I'm Harley, an artist, animator and programmer.
I make all kinds of useless stuff.

Spindle

A portable, hackable toolchain for static sites
RELEASED
2024 — Alpha
ROLE
Design
Implementation
DISCIPLINES
Programming
LICENSE
FOSS — MIT
SOURCES

GitHub

Spindle is a self-contained static-site generator. It's built around a handful of key principles —

The original Spindle was hacked together while I was on holiday, and it emerged entirely from the idea of a self-editing Markdown: what if you could redefine what # did on the fly? What if content and design were entwined as, most of the time, they probably should be. In Spindle, templating and content are defined in the same space as markup language and can be explicitly coupled for this purpose.

Only a handful of syntactic decisions govern Spindle's markup language; the rest are provided by you, defining new tokens, blocks and elements as you wish. Inline HTML is normal and expected in Spindle, as are reusable components that may or may not change based on context.

Spindle is a portable executable which hosts a Lua script. All of Spindle's core logic is executed by that script, while the executable only provides the Lua runtime and exports a few filesystem functions that Lua isn't capable of performing natively.

Spindle's Lua construction allows for total modularity. Components and functions may be overloaded and modified at any time. A token can be a templated string or it can be a Lua function that dynamically builds text from sources beyond the page itself. Spindle's core script can also be vendored into the project itself, to be hacked and modified as needed.

Everything else, after that, is up to you. Spindle can build websites out of the box, but its design is intended to construct a custom toolchain for every project it's used on. It's not a CMS or a static site generator that delivers a paradigm to construct a site in. It's more like a build system for websites.