forked from pub-solar/pub.solar
56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
# pub.solar homepage
|
|
|
|
This is the repository containing the code for https://pub.solar.
|
|
|
|
It is built using [lume](https://lume.land/) with JSX. To get started, make sure
|
|
you have the [nix package manager](https://nixos.org/download.html) installed.
|
|
Then you can start developing with:
|
|
|
|
### Quick start
|
|
|
|
```
|
|
nix develop
|
|
```
|
|
|
|
This will use a [nix devshell](https://nix.dev/tutorials/first-steps/ad-hoc-shell-environments#ad-hoc-envs)
|
|
to create an environment that has [deno](https://deno.land/) and [lume](https://lume.land/)
|
|
available.
|
|
|
|
An alternative approach for loading all dependencies is [`direnv`](https://direnv.net).
|
|
It basically runs `nix develop` for you, once you enter a directory which
|
|
contains a `.envrc` file and allow it by running `direnv allow`. Once installed
|
|
globally, run:
|
|
|
|
```
|
|
direnv allow
|
|
```
|
|
|
|
To get a live development server, run
|
|
|
|
```
|
|
deno task serve
|
|
```
|
|
|
|
Unfortunately, hot module reloading is currently broken for JSX modules, so
|
|
you'll need to restart this process regularly during development.
|
|
|
|
## Updating Open Sans
|
|
|
|
To update the font files and CSS, run `google-font-downloader $FONT_CSS_URL`.
|
|
As "documentation" `flake.nix` shows the internals, and
|
|
`_includes/styles/typography.css` has a comment at the top that shows which
|
|
command was used to generate it.
|
|
|
|
### Troubleshooting
|
|
An common error is:
|
|
|
|
```
|
|
22.31 error: The source code is invalid, as it does not match the expected hash in the lock file.
|
|
```
|
|
|
|
To recreate the deno lock file, run
|
|
|
|
```
|
|
deno cache --lock=deno.lock --lock-write _config.ts
|
|
```
|