Repo for the pub.solar website https://pub.solar
Find a file
teutat3s addee62044
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
flake: bump inputs
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/9126214d0a59633752a136528f5f3b9aa8565b7d' (2024-04-01)
  → 'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089?dir=lib' (2024-03-29)
  → 'eb9ceca17d.tar.gz?narHash=sha256-lIbdfCsf8LMFloheeE6N31%2BBMIeixqyQWbSr2vk79EQ%3D' (2024-06-01)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6' (2024-04-08)
  → 'github:nixos/nixpkgs/e8057b67ebf307f01bdcc8fba94d94f75039d1f6' (2024-06-05)
2024-06-06 20:28:54 +02:00
.well-known/matrix Add well-known for matrix federation 2022-05-01 00:00:17 +02:00
_data UX: improve navigation 2024-06-06 20:02:49 +02:00
_includes UX: improve navigation 2024-06-06 20:02:49 +02:00
assets v2: add donation qr code, fix asset loading 2024-04-12 21:10:18 +02:00
de UX: improve navigation 2024-06-06 20:02:49 +02:00
fonts/opensans/v40 fonts: use local fonts if available 2024-04-14 16:34:56 +02:00
scripts feat: add hakken themes and schedule 2023-12-26 22:11:36 +01:00
.dockerignore Add dockerignore, Dockerfile cleanup 2022-10-20 18:19:52 +02:00
.drone.yml ci: use IP instead of hostname to deploy files 2024-04-12 22:49:53 +02:00
.envrc Use tritonshell instead of shell.nix 2022-10-20 16:11:53 +02:00
.gitignore Basic lume setup 2022-10-02 20:46:42 +02:00
_config.ts v2: add donation qr code, fix asset loading 2024-04-12 21:10:18 +02:00
about.yml v2: add donation qr code, fix asset loading 2024-04-12 21:10:18 +02:00
deno.json Write to explicit lock file location 2023-05-19 15:56:43 +02:00
deno.lock flake: bump inputs 2024-06-06 20:28:54 +02:00
docker-compose.yml Add green hosting hint and Greenbaum Cloud logo+links 2022-05-01 00:43:17 +02:00
Dockerfile chore: bump deno version to 1.41.3 2024-04-12 18:54:16 +02:00
filters.ts feat: add hakken themes and schedule 2023-12-26 22:11:36 +01:00
flake.lock flake: bump inputs 2024-06-06 20:28:54 +02:00
flake.nix fonts: use local fonts if available 2024-04-14 16:34:56 +02:00
hakken.yml v2: initial commit 2024-03-06 16:34:00 +01:00
import_map.json chore: bump deno version to 1.39.1, lume to 2.0.1 2023-12-28 19:37:49 +01:00
index.yml UX: improve navigation 2024-06-06 20:02:49 +02:00
LICENSE.md Add aGPLv3 2022-01-16 21:44:53 +01:00
maintenance.yml feat: maintenance page 2023-10-27 22:41:34 +02:00
privacy.yml v2: move matrix privacy policy to its section 2024-04-12 19:30:22 +02:00
README.md docs: add deployment section to README 2024-04-12 19:43:52 +02:00
services.yml v2: initial commit 2024-03-06 16:34:00 +01:00
styles.scss Refactor the CSS to SCSS 2022-10-03 02:02:47 +02:00

pub.solar homepage

This is the repository containing the code for https://pub.solar.

It is built using lume with JSX. To get started, make sure you have the nix package manager installed. Then you can start developing with:

Quick start

nix develop

This will use a nix devshell to create an environment that has deno and lume available.

An alternative approach for loading all dependencies is direnv. 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.

Deployment

Our Drone CI is configured to deploy the main branch to the production website. To integrate any changes, first create a pull request, which will be reviewed. After merging it, the new version will get deployed automatically.

Troubleshooting

When running deno task serve, if you see an error message like:

NotFound: No such file or directory (os error 2): stat '/home/<user>/.../git.pub.solar/pub-solar/pub.solar/.direnv/flake-inputs/5acdh8xyry0kdvp6xla2hw7wf3zkphkl-source/pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/pkgs/by-name/fo/foo/foo.nix'
    at Object.statSync (ext:deno_fs/30_fs.js:362:7)
    at FS.#walkLink (https://deno.land/x/lume@v2.0.1/core/fs.ts:143:23)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:117:23)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21)
    at FS.#walkFs (https://deno.land/x/lume@v2.0.1/core/fs.ts:136:21) {
  name: "NotFound",
  code: "ENOENT"
}

try removing the .direnv directory:

rm -rf .direnv
deno task serve

Another common error message after updating dependencies 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