|
| 1 | +# Ψ₀ Website |
| 2 | + |
| 3 | +Astro site for the Ψ₀ project page and demo gallery. |
| 4 | + |
| 5 | +## Stack |
| 6 | + |
| 7 | +- Astro 6 |
| 8 | +- Static site output for GitHub Pages |
| 9 | +- Nix flake for local development |
| 10 | +- Plain CSS with content-driven Astro components |
| 11 | + |
| 12 | +## Local development |
| 13 | + |
| 14 | +```bash |
| 15 | +nix develop |
| 16 | +npm install |
| 17 | +npm run dev -- --host |
| 18 | +``` |
| 19 | + |
| 20 | +Astro usually serves the site at `http://localhost:4321`. |
| 21 | + |
| 22 | +## Validation |
| 23 | + |
| 24 | +```bash |
| 25 | +npm test |
| 26 | +nix develop --command npm run build |
| 27 | +``` |
| 28 | + |
| 29 | +## Deployment |
| 30 | + |
| 31 | +The repo is configured for GitHub Pages via `.github/workflows/deploy.yml`. |
| 32 | + |
| 33 | +Required GitHub setting: |
| 34 | + |
| 35 | +- `Settings > Pages > Source = GitHub Actions` |
| 36 | + |
| 37 | +To publish under `https://psi-lab.ai/Psi0`, host this code in the |
| 38 | +`physical-superintelligence-lab/Psi0` repository and keep the Astro `base` set to |
| 39 | +`/Psi0`. |
| 40 | + |
| 41 | +## Project layout |
| 42 | + |
| 43 | +- `src/pages/index.astro` |
| 44 | + Single route entry point. |
| 45 | +- `src/features/project-page/ProjectPage.astro` |
| 46 | + Top-level page composition for the Ψ₀ site. |
| 47 | +- `src/features/project-page/components/` |
| 48 | + Section components for hero, demos, method, and experiments. |
| 49 | +- `src/features/project-page/content/projectContent.js` |
| 50 | + Single project-content contract for hero text, demos, method blocks, tables, and asset references. |
| 51 | +- `src/features/project-page/content/siteConfig.js` |
| 52 | + Shared layout contract and site-level configuration such as demo geometry, footer copy, and TOC entries. |
| 53 | +- `src/features/project-page/project-page.css` |
| 54 | + Page-specific layout and component styling. |
| 55 | +- `src/styles/theme.css` |
| 56 | + Global theme tokens and base typography. |
| 57 | +- `public/figures/` |
| 58 | + Website-ready figure assets derived from the paper. |
| 59 | +- `public/media/psi-0/` |
| 60 | + Optimized website demo videos. |
| 61 | +- `public/paper/psi0-paper.pdf` |
| 62 | + Paper PDF exposed by the site. |
| 63 | +- `scripts/transcode-media.sh` |
| 64 | + ffmpeg-based media optimization helper. |
| 65 | +- `tests/project-page/` |
| 66 | + Regression tests for content contracts and feature structure. |
| 67 | +- `docs/project-page/architecture.md` |
| 68 | + Editing guide for the landing page feature module. |
| 69 | + |
| 70 | +## Content editing |
| 71 | + |
| 72 | +Most site edits should start in `src/features/project-page/content/projectContent.js`. |
| 73 | + |
| 74 | +That file exports one `projectPageContent` object with six top-level sections: |
| 75 | + |
| 76 | +- `hero` |
| 77 | +- `abstract` |
| 78 | +- `demos` |
| 79 | +- `method` |
| 80 | +- `experiments` |
| 81 | +- `footer` |
| 82 | + |
| 83 | +Only edit the Astro components when the layout or interaction model needs to change. |
| 84 | + |
| 85 | +## Reusing this for another project |
| 86 | + |
| 87 | +To adapt this site for another research/project page: |
| 88 | + |
| 89 | +1. Replace the values in `src/features/project-page/content/projectContent.js`. |
| 90 | +2. Put your project assets under `public/figures/`, `public/media/<your-project>/`, and `public/paper/`. |
| 91 | +3. Update shared layout knobs in `src/features/project-page/content/siteConfig.js` only if the default carousel/page geometry does not fit your content. |
| 92 | +4. Run `npm test` to catch missing assets and malformed content. |
| 93 | +5. Run `nix develop --command npm run build` before shipping. |
| 94 | + |
| 95 | +The demos carousel is intentionally driven by one shared geometry contract. Avoid per-theme layout overrides unless you are willing to update both CSS and the regression tests. |
| 96 | + |
| 97 | +See [docs/project-page/adoption.md](/home/zhenyu/src/psi0.github.io/docs/project-page/adoption.md) for a field-by-field adoption checklist. |
| 98 | + |
| 99 | +## Failure modes we now guard against |
| 100 | + |
| 101 | +- theme-to-theme demo card drift caused by hidden layout overrides |
| 102 | +- demo copy overflowing the shared card geometry |
| 103 | +- missing website source/footer configuration |
| 104 | +- accidental divergence between benchmark data and rendered table columns |
| 105 | + |
| 106 | +## Notes |
| 107 | + |
| 108 | +- The repo may contain large raw paper/media artifacts that are not part of the deployed site. |
| 109 | +- Prefer using the optimized assets under `public/` for website work. |
| 110 | + |
| 111 | +## TODO |
| 112 | + |
| 113 | +- [ ] verify deployed path is /Psi0 |
0 commit comments