Skip to content

Commit

Permalink
Add setup to main page & document nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
haglobah committed Oct 13, 2024
1 parent 947b7bc commit 590dc9c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,19 @@ but will appear before examples with a greater order.

## Reference: Technology choices

### JS

The website generated by `message-index` uses a few JS components.

- [highlight.js](https://highlightjs.org/) for highlighting blocks of code. [License: BSD 3-Clause](https://github.com/highlightjs/highlight.js/blob/main/LICENSE).
- [TableFilter](http://www.tablefilter.com/) for the filtering functionality in the error message table. [License: MIT](https://github.com/koalyptus/TableFilter/blob/master/LICENSE).

### Nix flake

The Nix flake uses [flake-parts](https://flake.parts/), as well as the flake-parts modules for
- [haskell-flake](https://github.com/srid/haskell-flake) ([haskell-flake flake-parts module](https://flake.parts/options/haskell-flake))
- [devshell](https://github.com/numtide/devshell) ([devshell flake-parts module](https://flake.parts/options/devshell))

Generally speaking, we choose technology for this site based on the following criteria:

* The build process for the site should be simple, relying on no build tools or package managers aside from `cabal` or `stack`
Expand Down
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,51 @@ Today, the Haskell Message Index supports three tools. Any user-facing Haskell-r
| GHCup | 0.1.19.0 | `GHCup-` |
| Cabal | 3.12 | `Cabal-` |

## Setup

This site is built with [Haskell](https://haskell.org) using the static-site generator [Hakyll](https://jaspervdj.be/hakyll/).

### 'Normal' Install

To run the site locally, you need to
0. [install Haskell & Cabal](https://www.haskell.org/ghcup/):
```shell
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
```
1. Clone the Repo
```shell
git clone https://github.com/haskellfoundation/error-message-index.git
```
2. Run it
```shell
cd error-message-index # yes,
cd message-index # both of those are needed
cabal update
cabal run -- site watch # Starts a web server on http://localhost:8000
```

### with Nix

To run the site with Nix, you need to have [Nix](https://nixos.org/) installed. You can install it via the [Determinate Systems installer](https://zero-to-nix.com/start/install):
```shell
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
1. Clone the Repo
```shell
git clone https://github.com/haskellfoundation/error-message-index.git
```
2. Run it
```shell
cd error-message-index # yes,
cd message-index # both of those are needed
nix develop
cabal run -- site watch # Starts a web server on http://localhost:8000
```

For more on the Nix flake, have a look [here](./CONTRIBUTING.md#nix-flake).

And now, since you're up and running, you can start [contributing](./CONTRIBUTING.md)! :)

## Contributing to the Message Index

Contributions may come in the form of changes to the code base, as well as opening or commenting on issues and pull requests. You are warmly invited to participate!
Expand Down

0 comments on commit 590dc9c

Please sign in to comment.