Add README with build instructions
This commit is contained in:
parent
ed3f357318
commit
bdd063a17d
2 changed files with 29 additions and 1 deletions
28
README.md
Normal file
28
README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# arnes.space
|
||||
|
||||
The files in this repository contain the basis for https://arnes.space. The development environment is defined using the [nix package manager](https://nixos.org/). After you have installed it and enabled [nix flakes](https://nixos.wiki/wiki/Flakes) you can install all dependencies required to build the static page using the following commands:
|
||||
|
||||
``` bash
|
||||
nix develop
|
||||
jpm load-lockfile
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
The site itself is built using [bagatto](https://bagatto.co/), which is a static site generator using [the janet programming language](https://janet-lang.org/). The main entry point is `index.janet` and you can rebuild the website using the bagatto binary:
|
||||
|
||||
```
|
||||
bag index.janet
|
||||
```
|
||||
|
||||
There is some code that starts a networked repl when you add the `--repl` flag to the above command. This allows you to interactively evaluate parts of the website, which is very handy if you want to understand how it works or change some parts.
|
||||
|
||||
The build output is in `site`, you can upload that to wherever static files are served from.
|
||||
|
||||
### Continuously rebuild the site on changes
|
||||
|
||||
Easy as π! Use `entr`, which is included in the development environment:
|
||||
|
||||
``` fish
|
||||
while true; fd | entr -d sh -c 'bag index.janet'; end
|
||||
```
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
pkgs = nixpkgs.legacyPackages.${platform};
|
||||
in {
|
||||
devShell.${platform} = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ janet multimarkdown ];
|
||||
buildInputs = with pkgs; [ janet multimarkdown entr ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue