Starting a new site
2026-01-29: Updated for the new nix-based setup.
Setting up a Linux system with Nix
- You will need a functional Linux-like system. MacOS should work fine, but I have not tried. If you are using Windows, I recommend WSL.
- Install nix:
- On relatively recent Linux versions, run
sudo apt install nix-binto get a recent enough version of nix. - Otherwise, follow the official installation instructions.
- On relatively recent Linux versions, run
- Verify that
nix --versiongives at least version 2.18.
Cloning the repository
- Follow instructions on GitHub to create a new repository. Do not initialize it with any files such as a README.
- Clone the repository.
- From your repository, pull in this template:
git remote add simple-pages git@github.com:pdg137/simple-pages.git git pull simple-pages master
Running the server
- Run
nix-shell. It should download a bunch of stuff and then give you a prompt after a few minutes. - Run
./server. The server will be available at http://localhost:4000/ - WSL users: you will need to run a browser in WSL (e.g.
chromium http://localhost:4000/) or else forward port 4000 to the Windows system.
Publishing your pages
- Run
git pushto update your pages on GitHub. - In your project settings on GitHub, find the section for Pages, and set it to “master branch”.
- Find that section again and follow the link to your new site.
Making changes
- Edit files as desired.
- Run the server to preview them. (Note that it auto-updates as you edit.)
- Run
git commit -a, check what appears, write a commit message, save, and exit. - Run
git push. - After a minute, GitHub pages should be showing the updated pages.