usage info & srcs upgrades
This commit is contained in:
parent
bb8ae74eba
commit
9244c2e20f
30
README.md
30
README.md
@ -4,7 +4,37 @@
|
||||
|
||||
[Hakyll](https://jaspervdj.be/hakyll/) + [Nix](https://nixos.org/) template
|
||||
|
||||
## Usage
|
||||
|
||||
1. Click the "Use this template" button and create your repository
|
||||
1. Renaming
|
||||
1. Rename all instances of `hakyll-nix-template` and `my-site` with a name for
|
||||
your project
|
||||
1. Rename `generator/my-site.cabal` to reflect your project name
|
||||
1. Cachix
|
||||
1. Create a cachix cache for your project on https://app.cachix.org
|
||||
1. Follow the cachix instructions to generate a signing keypair
|
||||
1. Copy the signing keypair value to a new `CACHIX_SIGNING_KEY` secret on
|
||||
https://github.com/<MYUSER>/<MY-PROJECT>/settings/secrets
|
||||
1. Run `nix-build` to build the project and `nix-shell` to open the nix shell
|
||||
1. If you want to update `niv` and the other pinned dependencies, then in the
|
||||
`nix-shell` run `niv init` and then `niv update` and then `exit` to leave the
|
||||
nix shell
|
||||
1. To start an environment for running hakyll commands like `hakyll-site watch`
|
||||
(the dev server) and `hakyll-site build`: `cd generator && nix-shell`. You'll
|
||||
then have access to the `hakyll-site` executable defined in
|
||||
`generator/my-site.cabal`. While you can do `nix-shell` in the root and then
|
||||
`cd generator && hakyll-site watch`, you get some more tools if you
|
||||
`nix-shell` from within the `generator/` folder.
|
||||
1. Once you're satisfied, create a branch, push your project up there, and check
|
||||
that the GitHub Actions successfully build. If so, you're good to merge your
|
||||
project with your main branch.
|
||||
1. Once you have a successful build on your main branch, open
|
||||
https://github.com/<MYUSER>/<MY-PROJECT>/settings and set the GitHub Pages
|
||||
branch to be the `gh-pages` branch
|
||||
|
||||
## Features
|
||||
|
||||
tl;dr: `nix-build` will collect all your pinned dependencies, build your hakyll
|
||||
site, and output the built site in a `result/` directory. If you set up the
|
||||
[main GitHub Action](./.github/workflows/main.yml) with what it needs (your
|
||||
|
@ -17,10 +17,10 @@
|
||||
"homepage": "https://github.com/NixOS/nixpkgs",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "05334ad78526ead39af85f846515606d9f052a11",
|
||||
"sha256": "1jrn6prplav0knaj859qqwg0l6mcyiv5yjd567hpgm4bi9hy1nxg",
|
||||
"rev": "edb26126d98bc696f4f3e206583faa65d3d6e818",
|
||||
"sha256": "1cl4ka4kk7kh3bl78g06dhiidazf65q8miyzaxi9930d6gwyzkci",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/05334ad78526ead39af85f846515606d9f052a11.tar.gz",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/edb26126d98bc696f4f3e206583faa65d3d6e818.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"pre-commit-hooks.nix": {
|
||||
@ -29,10 +29,10 @@
|
||||
"homepage": "",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "519988762d02e8ed7204723349f15cc31cb8a38e",
|
||||
"sha256": "169nhrg3bkvm0zqnrciapbpdvqdy3i772ijx9zjv6490i6ilp072",
|
||||
"rev": "efdbd6d28f7f44db3d9f8cf0e0b4cb9db0d259e1",
|
||||
"sha256": "1qngfbp1bqn52ipf992vrj4vp1cvvcv2yvzp0fs9yawqjxzk4j5m",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/cachix/pre-commit-hooks.nix/archive/519988762d02e8ed7204723349f15cc31cb8a38e.tar.gz",
|
||||
"url": "https://github.com/cachix/pre-commit-hooks.nix/archive/efdbd6d28f7f44db3d9f8cf0e0b4cb9db0d259e1.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user