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

1.6 KiB

ema

Ema is a next-gen Haskell library for building jamstack-style static sites, with fast hot reload. See ema.srid.ca for documentation.

The simplest Ema app looks like this:

main :: IO ()
main = do
  let name :: Text = "Ema"
  runEmaPure $
    encodeUtf8 $ "<b>Hello</b>, from " <> name

Quick Preview

If you have Nix installed, give Ema a test-drive by running it to serve its own documentation:

git clone https://github.com/srid/ema.git 
cd ema && PORT=8000 nix run . -- -C ./docs

Hacking

Run bin/run (or Ctrl+Shift+B in VSCode). This runs the documentation example; modify ./.ghcid to run a different example.

TODO

  • MVP
  • Implement hot reload, and ditch browser-sync
  • 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
  • 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