Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9b78d27

Browse files
committedJun 17, 2024··
Update cabal build instructions using project
- Add a note on builder package - Also mention cabal run as an option
1 parent 0b3266d commit 9b78d27

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed
 

‎README.md

+21-14
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,20 @@ to review it as soon as we can.
5353
### Working On The Builder
5454

5555
The `builder` is the static site generator that turns the markdown files, CSS,
56-
images, and scripts into a website. It lives in the `builder`. Most of the time,
57-
you won't need to make changes to the builder and you can follow the
58-
instructions in the _Contributing Changes_ section above.
56+
images, and scripts into a website.
57+
58+
> [!NOTE]
59+
> The package in the builder folder has the `haskell-org-site` executable:
60+
> ```
61+
> $ cat cabal.project
62+
> packages: builder
63+
>
64+
> $ cat builder/haskell-org.cabal | grep executable
65+
> executable haskell-org-site
66+
> ```
67+
68+
Most of the time, you won't need to make changes to the builder and you can
69+
follow the instructions in the _Contributing Changes_ section above.
5970
6071
If you want to make a quick change or two, you can continue to use the
6172
`buildAndWatch` script to rebuild changes, but for more substantial changes this
@@ -66,24 +77,20 @@ builder using either nix or cabal. Directions for both are given below:
6677
### Manually Building the Site With Cabal
6778
6879
If you don't have nix installed, or if you are inside of the project's nix
69-
shell, you will want to use cabal to compile the builder. To do so, enter the
70-
`builder` directory and compile the program with:
80+
shell, use cabal to build and execute the builder, the only package in
81+
the project.
7182
72-
```shell
73-
cabal v2-build
83+
```
84+
$ cabal build all
85+
$ cabal exec haskell-org-site build
7486
```
7587
76-
Once compiled, the builder must be run from the project root directory so that
77-
it can find all of the content. To run the builder, you need to first find the
78-
name of the executable. From the builder directory, you can find the executable
79-
path by running:
88+
With `cabal run` we can do this in one command.
8089
8190
```
82-
cabal v2-exec -- which haskell-org-site
91+
$ cabal run haskell-org-site -- build
8392
```
8493
85-
Using that path, you can run the builder from the project root directory.
86-
8794
### Manually Building the Site With Nix
8895
8996
If you have nix installed, you can have nix build the builder by running:

0 commit comments

Comments
 (0)
Please sign in to comment.