Ema static site for https://functionalprogramming.in/
Install Nix and then run bin/run to get the site up and running locally. See further below for static site generation.
To develop with full IDE support in Visual Studio Code, follow these steps:
- Install Nix
- Run
nix develop -c haskell-language-serverto sanity check your environment - Open the repository as single-folder workspace in Visual Studio Code
- Install the recommended extensions
- Ctrl+Shift+P to run the command "Nix-Env: Select Environment" and select
shell.nix. The extension will ask you to reload VSCode at the end.
- Press Ctrl+Shift+B in VSCode, or run
bin/runin terminal, to launch the Ema dev server, and navigate to http://localhost:8081/
All but the final step need to be done only once. Check the Ema tutorial next.
mkdir /tmp/site
nix run . -- gen /tmp/siteWorking on this repository without Nix is supported.
Some dependencies have been vendored in vendor/ for non-nix workflows. The setup has been tested to work with GHC 9.4.8.
cabal build
Use NPM and package.json to install tailwind packages.
npm install
Use NPM to start everything. This will concurrently start ghcid, as well as the tailwind watcher. Hot code reloading should work automatically.
npm start
mkdir /tmp/site
cabal run fpindia-site -- gen /tmp/siteOr simply -
npm run gen
- This project uses relude as its prelude, as well as Tailwind+Blaze as CSS utility and HTML DSL.
- Configuration:
- To change the port (or the Ema CLI arguments, used by
bin/run), see./.ghcid(if you leave out--porta random port will be used) - To update Ema to the latest Git revision -
- Nix instructions: run
nix flake lock --update-input emaor justnix flake update(the latter updates all Nix inputs) Be sure to check https://ema.srid.ca/start/upgrade for changes needed. - Non nix instructions: Update the copy of Ema in the
vendorfolder
- Nix instructions: run
- To change the port (or the Ema CLI arguments, used by
- You might want to change or remove the
<base>tag inMain.hsdepending on where you will be deploying the site.