mirror of
https://github.com/srid/ema.git
synced 2024-12-01 15:13:36 +03:00
1.5 KiB
1.5 KiB
ema
Ema is a next-gen Haskell library for building jamstack-style static sites, with fast hot reload. See ema.srid.ca for further information.
The simplest Ema app looks like this:
main :: IO ()
main = do
let name :: Text = "Ema"
runEmaPure $ \_ ->
encodeUtf8 $ "<b>Hello</b>, from " <> name
Hacking
Run bin/run
(or Ctrl+Shift+B in VSCode). This runs the documentation example; modify ./.ghcid
to run a different example, such as the clock example - which updates every second, demonstrating hot reload.
TODO
- MVP
- Implement hot reload, and ditch browser-sync
- server to client refresh
- client to server reconnect (on ghcid reload, or accidental client disconnect)
- or, investigate https://hackage.haskell.org/package/ghci-websockets
- Multi-websocket-client support
- Static site generation mode
- add common examples,
- filesystem watcher
- docs site for self (w/ breadcrumbs and possibly even search)
pre-announce,
- CLI UX
- opts
- logging
- Expose it to apps (inc/ helpers) in a simple way
- deal with errors
- How to serve non-generated files (css, img, etc.)
- Publish Data.LVar to Hackage
- documentation (guide)
- Avoid tailwind CDN in docs (use twind or windicss) for better lighthouse score