You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-14
Original file line number
Diff line number
Diff line change
@@ -11,25 +11,68 @@ Some of the others are
11
11
*www.haskell.org/platform (built from [haskell-platform](https://github.com/haskell/haskell-platform/tree/master/website))
12
12
*www.haskell.org/ghcup (build from [ghcup-hs](https://gitlab.haskell.org/haskell/ghcup-hs/-/tree/master/www)
13
13
14
-
### Cabal instructions
15
-
Just run `cabal v2-build` to build or `cabal v2-run` to run, and `cabal v2-run -- build` to actually build the site.
14
+
### Contributing Changes
16
15
17
-
### Nix instructions
16
+
The easiest way to make changes is to use the `buildAndWatch` script and then
17
+
point your web browser to [http://localhost:8000](http://localhost:8000). When
18
+
you are finished editing or want to re-build the hakyll part of the site, you
19
+
can stop the script by pressing `Control+c` (`C-c`).
18
20
19
-
This repo provides haskell.org as a nix derivation of a hakyll built static site. The `default.nix` file returns a set with two elements
20
-
- builder (the hakyll binary which processes source into the static site)
21
-
- built (the static site built by the builder, and ready to serve)
21
+
If you are only making changes to the content of the site, you can leave this
22
+
script running and it will automatically pick up changes and re-build the site
23
+
for you.
22
24
23
-
### Developing
25
+
If you want to change the `builder`, or if you encounter an error where your
26
+
changes to the content aren't being picked up, need to stop the script and
27
+
re-start it.
24
28
25
-
Simply run `nix-shell`. This will allow you to build the `haskell-org-site` binary which in turn builds the static site.
26
-
You may also edit the content of the site in the shell.
29
+
Once you're satisfied with your changes, make a PR and the maintainers will try
30
+
to review it as soon as we can.
27
31
28
-
### Editing
32
+
### Working On The Builder
29
33
30
-
You may install the `haskell-org-site` binary locally with `nix-env -f . -iA builder`. Once `haskell-org-site` is on your path you can edit content, and have
31
-
the site served with `site watch`.
34
+
The `builder` is the static site generator that turns the markdown files, CSS,
35
+
images, and scripts into a website. It lives in the `builder`. Most of the time,
36
+
you won't need to make changes to the builder and you can follow the
37
+
instructions in the _Contributing Changes_ section above.
32
38
33
-
### Building
39
+
If you want to make a quick change or two, you can continue to use the
40
+
`buildAndWatch` script to rebuild changes, but for more substantial changes this
41
+
might increase the build cycle time too much. In this case, you can build the
42
+
builder using either nix or cabal. Directions for both are given below:
34
43
35
-
To obtain the static `haskell-org-site` simply run `nix-build -A built` and the generated `result` link will contain the static site contents.
44
+
<aid="buildingWithoutNix"></a>
45
+
### Manually Building the Site With Cabal
46
+
47
+
If you don't have nix installed, or if you are inside of the project's nix
48
+
shell, you will want to use cabal to compile the builder. To do so, enter the
49
+
`builder` directory and compile the program with:
50
+
51
+
```shell
52
+
cabal v2-build
53
+
```
54
+
55
+
Once compiled, the builder must be run from the project root directory so that
56
+
it can find all of the content. To run the builder, you need to first find the
57
+
name of the executable. From the builder directory, you can find the executable
58
+
path by running:
59
+
60
+
```
61
+
find dist-newstyle -name 'haskell-org-site' -type f
62
+
```
63
+
64
+
Using that path, you can run the builder from the project root directory.
65
+
66
+
### Manually Building the Site With Nix
67
+
68
+
If you have nix installed, you can have nix build the builder by running:
69
+
70
+
```
71
+
nix-build -A builder
72
+
```
73
+
74
+
You may then run the builder binary from the `result` directory:
0 commit comments