Announcing Ema - Static Sites in Haskell
A little over a year ago I created the rib static site generator in based on Shake and . The idea was to be able to write a more intuitive (so no Makefile-like rules) set of instructions for building a static site, in a type-safe language while enabling quick recompilation cycle that provided, all made reproducible in .
Later that year I built(note-taking system and for publishing for Markdown files as a static site) on top of rib and announced it (see ). Neuron has the ability to monitor changes to Markdown files and update the static site. After modifying your notes you would however have to manually refresh the browser.
I explored the idea of hot-reload’ing the notebook view instantly on Markdown file change in video demo of it here. Likewise, the – another brief exploration – also supported hot reload. But both these projects were not static sites, and they were built on and . I also recently got to play with SvelteKit for creating static sites, and its hot reload feature in particular impressed me; however I’m no fan of using a less safe language (see ), so I wanted to take the best aspects of these projects and prototype something in Haskell.1. You can see a
I decided to meld the ideas explored in the aforementioned projects and thereby create a more general static site generator that supports hot-reload as well as enables creation of applications like Neuron. Today I’m announcing it: Ema. Here’s a quick demo:
It is worth emphasizing that I designed Ema to facilitate a new model of application development – one where the data is managed and edited outside of the application itself (such as in text editors, or even a database), but the view of the data is provided by the application. orgself project that also uses Ema. A third example is to take a OPML file and present a daily-digest view of new content from the RSS feeds; the application would provide only a “view” into your data, which is a XML file that you may edit however you see fit. I like this model of apps, because the data and the data format remains under my control, all the while yet I’m not limited when it comes to presentation of that data, and I think the web is a great platform for the later.is a great example of that (and it might well be eventually rewritten on top of Ema). Another example is writing a diary / journal view on top of org-mode daily notes, which is what I’m exploring in the