You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,28 @@
3
3
This repository powers [ethotechnics.org](https://ethotechnics.org), a content-driven site exploring ethical technology, human-centered design, and the sociotechnical systems that shape them. The project favors lean, fast-loading pages and clear storytelling.
4
4
5
5
## Getting started
6
+
6
7
1. Install dependencies: `npm install`
7
8
2. Run the dev server: `npm run dev`
8
9
3. Build the Worker bundle: `npm run build` (optionally preview with `npm run preview`).
9
10
10
11
## Checks before committing
12
+
11
13
Use `npm run check` for a full pre-commit sweep. It will run linting, tests, TypeScript checks, and Astro's checker (skipping any step that is not configured).
14
+
15
+
## End-to-end tests
16
+
17
+
-`npm run e2e` builds the Worker bundle and runs Playwright against `npm run preview`.
18
+
- Override the preview target with `PLAYWRIGHT_BASE_URL` (defaults to `http://127.0.0.1:4321`).
19
+
- CI uses `npm run e2e:ci` and publishes the Playwright HTML report as a workflow artifact.
20
+
12
21
### Environment configuration
22
+
13
23
- Copy `.env.example` to `.env.local` for local development. Astro automatically loads `.env`, `.env.local`, and environment-specific files (such as `.env.development`).
14
24
- No environment variables are required today, but add new entries to `.env.example` if the project adopts external services.
25
+
15
26
## Quickstart for agents
27
+
16
28
-**Prerequisites:** Node.js 20+ with npm (project uses `package-lock.json`), Git, and a shell with `npm` on PATH.
17
29
-**Dev server:**`npm run dev`
18
30
- Expected log snippet: `[@astrojs/compiler] ready` followed by `Local http://localhost:4321/`.
@@ -23,6 +35,7 @@ Use `npm run check` for a full pre-commit sweep. It will run linting, tests, Typ
23
35
- If commands are slow or fail, confirm Node version with `node -v` and reinstall dependencies via `rm -rf node_modules && npm install`.
24
36
25
37
## Deployment to Cloudflare Workers
38
+
26
39
The site uses the official Cloudflare adapter for Astro to produce a Worker-compatible server build.
27
40
28
41
`wrangler.toml` captures the Worker name, compatibility date, and entrypoint (`dist/_worker.js`). Session storage is not enabled by default; if you add it later, define the KV binding in `wrangler.toml` before deploying.
@@ -36,15 +49,18 @@ The site uses the official Cloudflare adapter for Astro to produce a Worker-comp
36
49
5. Configure DNS for `ethotechnics.org` to point to the Cloudflare Worker route you set in Wrangler.
37
50
38
51
## Tech stack
52
+
39
53
-[Astro 5](https://astro.build) with strict TypeScript defaults
40
54
- React island for the navigation, hydrated on load
41
55
- Cloudflare Worker adapter for server output
42
56
- Modern, responsive styling with a focus on accessibility and contrast
43
57
44
58
## Staying updated
59
+
45
60
- Subscribe to the RSS feed at [`/rss.xml`](https://ethotechnics.org/rss.xml) to catch new pages and updates as they ship.
46
61
47
62
## Where things live
63
+
48
64
-`src/pages`: Astro routes, starting with [`src/pages/index.astro`](src/pages/index.astro) for the homepage content.
49
65
-`src/layouts`: Shared layouts such as [`src/layouts/BaseLayout.astro`](src/layouts/BaseLayout.astro), which wires global SEO, fonts, and the navigation shell.
50
66
-`src/components`: Interactive islands like the navigation React component in [`src/components/Navigation.tsx`](src/components/Navigation.tsx).
0 commit comments