Tweaks, fixes, and launch prep
This commit is contained in:
10
AGENTS.md
10
AGENTS.md
@@ -10,7 +10,8 @@ This repo is a **one-page static** Linktree-style site for mifi.dev. It is **not
|
||||
- **TypeScript** (always)
|
||||
- **pnpm** (only); do not use npm or yarn
|
||||
- **PostCSS** for CSS (nesting + preset-env)
|
||||
- **Critical CSS** via post-build script (`scripts/critical-css.mjs`); full build with critical CSS is `pnpm run build:full` (requires Chromium)
|
||||
- **Critical CSS** via post-build script (`scripts/critical-css.mjs`); full build with critical CSS is `pnpm run build:full` (run `pnpm run critical-css:install` once to install Chromium)
|
||||
- **CSP-safe scripts:** Post-build `scripts/externalize-inline-script.mjs` moves SvelteKit’s inline bootstrap script to `_app/immutable/bootstrap.[hash].js` so CSP can use `script-src 'self'` without `unsafe-inline`
|
||||
- **Content:** JSON in `src/lib/data/` (e.g. `links.json`), loaded in `+page.server.ts` at build time
|
||||
- **CSP:** Set by Traefik middleware; do not add CSP in app code
|
||||
|
||||
@@ -19,8 +20,8 @@ This repo is a **one-page static** Linktree-style site for mifi.dev. It is **not
|
||||
- Use **semantic HTML** and **JSON-LD** for SEO; target **WCAG 2.2 AAA** for accessibility.
|
||||
- **No unsafe-inline** scripts; all JS via `<script src="...">`.
|
||||
- **Dev container** uses the same Linux + Playwright Chromium as CI so e2e/visual-regression snapshots are comparable.
|
||||
- **Docker:** Single image with both variants; **nginx** does host-based routing (mifi.dev / www.mifi.dev → `/html/dev`, mifi.bio / www.mifi.bio → `/html/bio`). Traefik labels for both hosts; network `marina-net`. Dockerfile builds both with `CONTENT_VARIANT=dev` and `CONTENT_VARIANT=bio`.
|
||||
- **CI:** Woodpecker; pipeline runs lint, unit tests, e2e/visual regression, build (pnpm).
|
||||
- **Docker:** Single image with both variants; **nginx** does host-based routing (mifi.dev / www.mifi.dev → `/html/dev`, mifi.bio / www.mifi.bio → `/html/bio`). Traefik labels for both hosts; network `marina-net`. Dockerfile builds both with `CONTENT_VARIANT=dev` and `CONTENT_VARIANT=bio`, each with critical CSS inlined.
|
||||
- **CI:** Woodpecker; pipeline runs lint, unit tests, e2e/visual regression, build (pnpm), and build-full (critical CSS; installs Chromium).
|
||||
|
||||
## Key paths
|
||||
|
||||
@@ -28,6 +29,7 @@ This repo is a **one-page static** Linktree-style site for mifi.dev. It is **not
|
||||
- `src/lib/data/` – JSON content
|
||||
- `src/app.html` – HTML shell
|
||||
- `scripts/critical-css.mjs` – post-build critical CSS
|
||||
- `scripts/externalize-inline-script.mjs` – post-build: extract bootstrap script for CSP
|
||||
- `.devcontainer/` – dev container (Node, pnpm, Playwright Linux)
|
||||
- `Dockerfile` – multi-stage build (both dev + bio variants), then nginx with host-based routing
|
||||
- `nginx/default.conf` – nginx server blocks for mifi.dev and mifi.bio
|
||||
@@ -37,6 +39,6 @@ This repo is a **one-page static** Linktree-style site for mifi.dev. It is **not
|
||||
|
||||
- Install: `pnpm install`
|
||||
- Dev: `pnpm dev`
|
||||
- Build: `pnpm build` (or `pnpm build:full` for critical CSS)
|
||||
- Build: `pnpm build` (static SSR HTML + externalized script; or `pnpm build:full` for critical CSS; run `pnpm run critical-css:install` once first)
|
||||
- Lint: `pnpm lint`
|
||||
- Test: `pnpm test:run`, `pnpm test:e2e`
|
||||
|
||||
Reference in New Issue
Block a user