Skip to content

Commit eb7fa66

Browse files
committed
feat(website): kolu.dev, light/dark toggle, author link + PR #625 review
Domain * astro.config.mjs: site=https://kolu.dev, no base prefix (project- site /kolu is gone); public/CNAME ships alongside the build. * README references updated. Light/dark toggle * data-theme on <html> with FOUC-safe inline bootstrap script (reads localStorage, falls back to prefers-color-scheme). * Toggle button in Header with sun/moon SVGs that cross-fade. * Light palette (warm paper + dark amber) overrides the dark tokens via [data-theme="light"]. * shikiConfig uses themes:{light,dark} + defaultColor:false; global.css routes CSS variables via data-theme so code blocks track the toggle. Author link * content.config.ts: new authorUrl field (default https://srid.ca/). * blog post page renders the author as a link. PR #625 review feedback * pubDate: apr 17 -> apr 18. * docs/perf-investigations/the-leak-that-wasnt-in-any-context.md is deleted — blog post now lives only in website/src/content/blog/. * favicon duplication: packages/client/favicon.svg is the single canonical copy; packages/client/public/favicon.svg and website/public/favicon.svg are symlinks to it. The root flake builds website by synthesizing src = website/ + resolved favicon, so the Nix sandbox sees real bytes even though the working tree has a cross-directory symlink. * Pages workflow: nixbuild/nix-quick-install-action (drop the Determinate installer + magic-nix-cache combo). * website/README.md slimmed to essentials.
1 parent 17a112b commit eb7fa66

16 files changed

Lines changed: 195 additions & 387 deletions

File tree

.github/workflows/pages.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Build and deploy the Kolu website to GitHub Pages.
22
#
33
# The site lives in website/ and is exposed as packages.${system}.website
4-
# by the root flake — so `nix build .#website` produces the static artefact
5-
# that this workflow uploads.
4+
# by the root flake — `nix build .#website` produces the static artefact.
65
name: pages
76

87
on:
98
push:
109
branches: [master, pure-earth]
1110
paths:
1211
- "website/**"
13-
- "docs/perf-investigations/**"
12+
- "packages/client/favicon.svg"
1413
- ".github/workflows/pages.yml"
1514
workflow_dispatch:
1615

@@ -29,16 +28,17 @@ jobs:
2928
steps:
3029
- uses: actions/checkout@v4
3130

32-
- uses: DeterminateSystems/nix-installer-action@v16
31+
- uses: nixbuild/nix-quick-install-action@v31
3332
with:
34-
extra-conf: |
33+
nix_conf: |
3534
extra-substituters = https://cache.nixos.asia/oss
3635
extra-trusted-public-keys = oss:KO872wNJkCDgmGN3xy9dT89WAhvv13EiKncTtHDItVU=
36+
accept-flake-config = true
3737
3838
- name: Build website (nix)
39-
run: nix build .#website --print-out-paths --accept-flake-config
39+
run: nix build .#website --print-out-paths
4040

41-
- name: Stage artifact
41+
- name: Stage artefact
4242
run: |
4343
# result/ is a symlink into /nix/store (read-only). Pages needs
4444
# a writable directory with a .nojekyll file and correct perms.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ If kolu grows unbounded (V8 heap climbing over hours), set `services.kolu.diagno
259259

260260
## Website
261261

262-
The marketing site and blog at <https://juspay.github.io/kolu> live in [`website/`](website/) — Astro + Tailwind, its own zero-input flake, deployed to GitHub Pages via `.github/workflows/pages.yml`.
262+
The marketing site and blog at <https://kolu.dev> live in [`website/`](website/) — Astro + Tailwind, its own zero-input flake, deployed to GitHub Pages via `.github/workflows/pages.yml`.
263263

264264
```sh
265265
just website::dev # live preview with HMR

docs/perf-investigations/the-leak-that-wasnt-in-any-context.md

Lines changed: 0 additions & 266 deletions
This file was deleted.

flake.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,17 @@
3131
packages = eachSystem (pkgs:
3232
let
3333
kolu = import ./default.nix { inherit pkgs commitHash; };
34-
website = import ./website { inherit pkgs; };
34+
# Synthesized website source tree: website/ with the canonical
35+
# favicon copied in where the working tree has a symlink to
36+
# ../../packages/client/favicon.svg. One SVG on disk; the Nix
37+
# sandbox still sees a self-contained website/ with real bytes.
38+
websiteSrc = pkgs.runCommand "kolu-website-src" { } ''
39+
cp -r ${./website} $out
40+
chmod -R u+w $out
41+
rm -f $out/public/favicon.svg
42+
cp ${./packages/client/favicon.svg} $out/public/favicon.svg
43+
'';
44+
website = import ./website { inherit pkgs; src = websiteSrc; };
3545
in
3646
removeAttrs kolu [ "koluEnv" ] // {
3747
website = website.default;

packages/client/public/favicon.svg

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/client/public/favicon.svg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../favicon.svg

0 commit comments

Comments
 (0)