1
1
mirror of https://github.com/srid/ema.git synced 2024-12-01 15:13:36 +03:00
ema/README.md

49 lines
1.9 KiB
Markdown
Raw Normal View History

2021-04-19 17:48:00 +03:00
# ema
2021-04-20 22:20:12 +03:00
<img width="10%" src="./ema.svg">
2021-04-21 22:21:03 +03:00
ema is a **WIP** next-gen Haskell static site generator that is *change-aware*. In addition to static site generation, it provides a live server that hot-reload's on code *or* data change.
2021-04-19 17:48:00 +03:00
2021-04-19 18:36:51 +03:00
The ultimate goal of ema is to make it possible to easily implement your own [neuron](https://neuron.zettel.page/), or just about any app that creates a browser view of arbitrarily changing data (on disk, database, or whatever). ema is designed to facilitate creation of apps whose data is normally *edited* via traditional mechanisms (eg: text editor) but *rendered* as a delightful web page - so as to provide an economical read-only view, of your data, on desktop & mobile.
2021-04-19 18:18:38 +03:00
The simplest ema app looks like this:
```haskell
main :: IO ()
main = do
let name :: Text = "Srid"
runEmaPure $ \() ->
encodeUtf8 $ "<b>Hello,</b> " <> name
```
2021-04-19 18:07:52 +03:00
## Hacking
2021-04-20 18:14:29 +03:00
Run `bin/run` (or <kbd>Ctrl+Shift+B</kbd> in VSCode). This runs the clock example; modify `./.ghcid` to run a different example.
2021-04-19 18:07:52 +03:00
## TODO
- [x] MVP
2021-04-19 22:34:10 +03:00
- [x] Implement hot reload, and ditch browser-sync
2021-04-19 18:07:52 +03:00
- [x] server to client refresh
- [x] client to server reconnect (on ghcid reload, or accidental client disconnect)
- [x] or, investigate https://hackage.haskell.org/package/ghci-websockets
- [x] Multi-websocket-client support
2021-04-21 00:09:37 +03:00
- [ ] Refactor Server.hs
2021-04-21 00:51:14 +03:00
- [ ] Static site generation mode
- [ ] add common examples,
- [x] filesystem watcher
- [ ] docs site for self (w/ sidebar and possibly even search)
2021-04-20 01:51:27 +03:00
pre-announce,
2021-04-20 22:20:12 +03:00
- [ ] plan features / messaging, re: hakyll
- Safer and simpler routes system
- Template system?
- [ ] CLI UX (opts, logging, etc.)
- [ ] documentation ([howto](https://documentation.divio.com/))
2021-04-21 00:51:14 +03:00
- [ ] Publish Data.LVar to Hackage
2021-04-19 18:07:52 +03:00
doc notes,
- use async:race to avoid ghcid ghosts
- at most one ws client supported right now
- tailwind + blaze-html layout (BlazeWind?) for no-frills getting started