Skip to content

Commit 6bdfde0

Browse files
intivalderasclaude
andcommitted
docs: make README public/community-friendly; tidy CLAUDE.md
- README now welcomes contributors, links the live site, and explains how to add stories/activities and open a PR. - CLAUDE.md reframed as neutral contributor/AI notes; dropped personal working preferences and internal pointers, kept the useful gotchas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NNgU2qZuAkHUbhzVgERVvd
1 parent 2a352ff commit 6bdfde0

2 files changed

Lines changed: 131 additions & 97 deletions

File tree

‎CLAUDE.md‎

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,64 @@
1-
# okbe website-v2
1+
# Contributor & AI-assistant notes
22

3-
New version of the Open Knowledge Belgium org site (openknowledge.be). Replaces the
4-
old Gatsby 2 + Netlify CMS site. Umbrella-org marketing site — NOT the iRail platform.
3+
Quick orientation for anyone (human or AI) working in this repo. See the
4+
[README](README.md) for the friendly overview and contribution guide.
55

6-
## Working preferences
6+
This is the **Open Knowledge Belgium website** — a static [Astro](https://astro.build) site.
7+
Content is plain Markdown in `src/content/`; there is intentionally **no CMS**. Please keep it
8+
that way.
79

8-
- **Do NOT drive the browser to verify changes.** Don't use Playwright / browser
9-
screenshots. Verify with `pnpm build` output, by grepping the built HTML/CSS, or
10-
image analysis — and let the user preview themselves (`pnpm dev` → localhost:4321).
11-
Ask first if a visual check genuinely needs a screenshot.
12-
- Content is plain Markdown, edited in-repo (no CMS). Keep it that way.
13-
- Brand: deep purple `#301948` (`brand`), electric purple `#641bff` (`electric`).
14-
Titles = Work Sans, body = Chivo.
15-
16-
## Stack
17-
18-
Astro 5 (static) · React islands (`client:visible` / `client:load`) · Tailwind 3 +
19-
Relume design system · `motion` (Framer Motion) for scroll reveals · pnpm.
10+
## Commands
2011

2112
```bash
2213
pnpm install
2314
pnpm dev # http://localhost:4321
24-
pnpm build # static → dist/
15+
pnpm build # static build → dist/ (also the CI check)
2516
```
2617

27-
## Structure
18+
Node 22+ is required. Deploys happen automatically via GitHub Actions on push to `main`.
19+
20+
## Layout
2821

2922
```
3023
src/
31-
├── components/react/ # animated islands (Hero, Navbar, ActivitiesGrid, StoriesGrid, NewsletterCTA, Reveal)
32-
├── components/ui/ # vendored Relume primitives (button, card, input)
24+
├── components/react/ # interactive/animated islands (Hero, Navbar, grids, NewsletterCTA, Reveal)
25+
├── components/ui/ # design-system primitives (button, card, input)
3326
├── content/{stories,activities,pages}/ # Markdown content collections
34-
├── config/site.ts # nav, footer, socials, contact (single source)
35-
├── lib/content.ts # collection helpers (sorting, excerpts, cards, logoChipBg)
27+
├── config/site.ts # nav, footer, socials, contact — single source
28+
├── lib/content.ts # collection helpers (sorting, excerpts, cards, logo colours)
3629
├── data/logo-luminance.json # generated: which activity logos are light/dark
3730
└── pages/ # routes
38-
public/uploads/ # all images (referenced by absolute /uploads/... paths)
39-
scripts/ # migrate-content.mjs (one-shot), analyze-logos.mjs
31+
public/uploads/ # all images (referenced with absolute /uploads/… paths)
32+
scripts/ # analyze-logos.mjs, migrate-content.mjs (one-shot import)
4033
```
4134

4235
## Content notes
4336

4437
- **Activities** (`src/content/activities/*.md`): `status: active | past` (default `past`).
45-
Active ones show under "Active now" on `/activities` + home; with none active, both show
46-
an invitation band. Logo chip background is chosen automatically by logo brightness — if you
47-
add/replace a logo, run `node scripts/analyze-logos.mjs` to refresh `logo-luminance.json`.
48-
- **Stories** (`src/content/stories/*.md`): ~130 migrated posts, paginated 24/page.
38+
Active ones appear under “Active now”; with none active the page shows an invitation band.
39+
The logo chip background is picked automatically from each logo's brightness — after adding or
40+
replacing a logo, run `node scripts/analyze-logos.mjs` to refresh `data/logo-luminance.json`.
41+
- **Stories** (`src/content/stories/*.md`): paginated 24 per page.
4942
- **Team** (`src/content/pages/team.md`): board members live under `board.members`
50-
(name, role, photo, linkedin). Photos in `public/uploads/team/`.
51-
- **Newsletter/GA forms** feed a Notion CRM (workspace "Open Knowledge Belgium",
52-
MCP `notion-okbe`). See the session memory `okbe-notion-crm` for DB IDs.
43+
(`name`, `role`, `photo`, `linkedin`); photos in `public/uploads/team/`.
44+
45+
## Gotchas worth knowing
46+
47+
- **The Relume Tailwind preset replaces some core scales.** It overrides `maxWidth`
48+
(only `xxs…xxl`, and `xl` = 64rem!), `fontSize`, and `gradientColorStops`, so classes like
49+
`max-w-2xl` / `max-w-3xl` silently render full-width. Use arbitrary values such as
50+
`max-w-[42rem]` for reading measures.
51+
- **Animation uses the `motion` package** (`import … from "motion/react"`), **not** `framer-motion`.
52+
- **`relume-icons`** ships ~60 icons only (e.g. no `ArrowOutward` — use `ArrowForward`).
53+
- **pnpm 11.9+** reads native-build approval from `pnpm-workspace.yaml`
54+
(`allowBuilds: { esbuild: true, sharp: true }` + `onlyBuiltDependencies`); the `package.json`
55+
`pnpm` field is ignored, and `astro build` fails its dependency check without it.
56+
- **No-JS fallback:** `motion` bakes `opacity:0` into the SSR HTML, so `BaseLayout` has a
57+
`<noscript>` rule that forces revealed content visible. Keep it.
58+
- The `Duplicate id "team"` build warning only appears while `pnpm dev` is running alongside a
59+
build (shared `.astro` cache) — a clean `pnpm build` is silent. Not a real bug.
5360

54-
## Gotchas (learned the hard way)
61+
## Verifying changes
5562

56-
- **Relume Tailwind preset replaces core scales.** It overrides `maxWidth`
57-
(only xxs/xs/sm/md/lg/xl/xxl, and `xl`=64rem!), `fontSize`, and `gradientColorStops`.
58-
So `max-w-2xl`/`max-w-3xl` silently render full-width. **Use arbitrary values**
59-
like `max-w-[42rem]` for reading measures. Article body = `max-w-[42rem]`.
60-
- **Use the `motion` package, import `motion/react`** — NOT `framer-motion`.
61-
- **`relume-icons`** has no `ArrowOutward`; use `ArrowForward`. ~60 icons only.
62-
- **pnpm 11.9** needs `pnpm-workspace.yaml` with `allowBuilds: {esbuild: true, sharp: true}`
63-
+ `onlyBuiltDependencies` — the `package.json` `pnpm` field is ignored, and `astro build`
64-
fails its deps-check without it.
65-
- **No-JS reveal fallback:** motion bakes `opacity:0` into SSR HTML; `BaseLayout` has a
66-
`<noscript>` rule forcing that content visible. Keep it.
67-
- **The `Duplicate id "team"` build warning** only appears while `pnpm dev` is also running
68-
(shared `.astro` cache) — a clean `pnpm build` is silent. Not a real bug.
63+
Prefer confirming a change with `pnpm build` and by checking the built output in `dist/`. Use
64+
`pnpm dev` for visual review.

‎README.md‎

Lines changed: 90 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,116 @@
1-
# Open Knowledge Belgium — website (v2)
1+
# Open Knowledge Belgium website
22

3-
A modern rebuild of [openknowledge.be](https://openknowledge.be), the umbrella-organisation
4-
site for Open Knowledge Belgium.
3+
The official website of **[Open Knowledge Belgium](https://openknowledge.be)** — an umbrella
4+
organisation (vzw/asbl) for the many open-knowledge and open-data initiatives in Belgium.
55

6-
Built with **Astro** + **React islands** + **Tailwind** (Relume design system), with animated
7-
sections and git-based Markdown content (no CMS).
6+
[![Live site](https://img.shields.io/badge/live-openknowledge.be-641bff)](https://openknowledge.be)
7+
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
8+
[![Deploy to GitHub Pages](https://github.com/openknowledgebe/website-v2/actions/workflows/deploy.yml/badge.svg)](https://github.com/openknowledgebe/website-v2/actions/workflows/deploy.yml)
89

9-
## Tech stack
10+
It's a fast, static site built with [Astro](https://astro.build). All content lives as plain
11+
Markdown in this repo, so it's easy to read, review, and contribute to — no CMS or login required.
1012

11-
| Concern | Choice |
13+
---
14+
15+
## ✨ Contributing
16+
17+
We welcome contributions from the community — fixing a typo, adding a story, updating an
18+
activity, or improving the site itself.
19+
20+
The easiest way: **edit a Markdown file straight on GitHub** (use the ✏️ button on any file) and
21+
open a pull request. For anything bigger, fork the repo and run it locally (below).
22+
23+
Common edits:
24+
25+
| I want to… | Edit |
1226
|---|---|
13-
| Framework | [Astro 5](https://astro.build) (static output) |
14-
| Interactive/animated sections | React islands hydrated with `client:visible` / `client:load` |
15-
| Animation | [`motion`](https://motion.dev) (Framer Motion), tasteful scroll reveals + hover |
16-
| Styling | Tailwind 3 + [`@relume_io/relume-tailwind`](https://relume.io) preset + OKBE brand tokens |
17-
| UI components | Relume (vendored, shadcn-style — we own the files) |
18-
| Content | Markdown in `src/content/*` via Astro content collections |
19-
| Package manager | pnpm |
27+
| Publish a **story / blog post** | add a file in [`src/content/stories/`](src/content/stories) |
28+
| Add or update an **activity / project** | a file in [`src/content/activities/`](src/content/activities) |
29+
| Change the **Home / About / Team** pages | [`src/content/pages/`](src/content/pages) |
30+
| Update **navigation, footer, contact** | [`src/config/site.ts`](src/config/site.ts) |
2031

21-
## Getting started
32+
See [Editing content](#-editing-content) for the field details. Every pull request gets a preview
33+
build, and once merged it deploys to [openknowledge.be](https://openknowledge.be) automatically.
34+
35+
## 🚀 Run it locally
36+
37+
Requires [Node.js](https://nodejs.org) 22+ and [pnpm](https://pnpm.io).
2238

2339
```bash
2440
pnpm install
2541
pnpm dev # http://localhost:4321
26-
pnpm build # static build -> dist/
42+
pnpm build # production build → dist/
2743
pnpm preview # preview the production build
2844
```
2945

30-
## Project structure
46+
## 🧩 Tech stack
47+
48+
| | |
49+
|---|---|
50+
| Framework | [Astro](https://astro.build) — static output |
51+
| Interactivity & animation | React islands + [`motion`](https://motion.dev) (scroll reveals, hover) |
52+
| Styling | Tailwind CSS + the [Relume](https://relume.io) design system + OKBE brand tokens |
53+
| Content | Markdown via Astro content collections |
54+
| Hosting | GitHub Pages (auto-deploy on push to `main`) |
55+
56+
## 📁 Project structure
3157

3258
```
3359
src/
3460
├── components/
35-
│ ├── react/ # animated islands (Hero, Navbar, grids, CTA, Reveal)
36-
│ ├── ui/ # vendored Relume primitives (button, card, input)
37-
│ ├── Footer.astro
38-
│ └── PageHeader.astro
61+
│ ├── react/ # interactive/animated islands (Hero, Navbar, grids, newsletter…)
62+
│ └── ui/ # design-system primitives (button, card, input)
3963
├── content/
40-
│ ├── stories/ # ~130 blog posts (Markdown)
41-
│ ├── activities/ # project/community pages (Markdown)
42-
│ └── pages/ # home / about / team singletons (Markdown frontmatter)
43-
├── config/site.ts # nav, footer, socials, contact
44-
├── layouts/ # BaseLayout (SEO/head) + PageLayout (nav + footer)
45-
├── lib/content.ts # collection helpers (sorting, excerpts, cards)
46-
├── pages/ # routes
47-
└── styles/global.css # Tailwind + fonts + article/prose styles
48-
49-
public/uploads/ # migrated images (stories / activities / team / home)
64+
│ ├── stories/ # blog posts (Markdown)
65+
│ ├── activities/ # projects & communities (Markdown)
66+
│ └── pages/ # Home / About / Team (Markdown frontmatter)
67+
├── config/site.ts # nav, footer, socials, contact — one place
68+
├── layouts/ # page shell + SEO/head
69+
├── lib/ # content helpers
70+
├── pages/ # routes
71+
└── styles/ # global styles + article typography
72+
public/uploads/ # images, referenced with absolute /uploads/… paths
73+
```
74+
75+
## 📝 Editing content
76+
77+
All content is plain Markdown with a small YAML frontmatter block at the top.
78+
79+
**A story** — `src/content/stories/<yyyymmdd-slug>.md`
80+
81+
```yaml
82+
---
83+
title: Your headline
84+
date: 2026-01-31
85+
author: Your name
86+
tags: [open data, event]
87+
excerpt: One-sentence summary (optional).
88+
---
89+
Your post, in Markdown. Images go in public/uploads/stories/<slug>/ and are
90+
referenced like /uploads/stories/<slug>/photo.jpg
5091
```
5192

52-
## Editing content
93+
**An activity** — `src/content/activities/<slug>.md`
94+
95+
- `status: active` lists it under **“Active now”**; `status: past` (the default) files it under
96+
**“Past activities”**. When nothing is active, the site invites people to start something.
97+
- Other fields: `name`, `logo`, `tags`, `to` (website), `catchphrase`, `featured_image`,
98+
`contact_info`, `members`.
99+
100+
**Home / About / Team** — `src/content/pages/{home,about,team}.md`.
53101

54-
All content is plain Markdown — edit it in the repo (or on GitHub) and push.
102+
## 🎨 Brand
55103

56-
- **A story:** add `src/content/stories/<yyyymmdd-slug>.md` with frontmatter
57-
`title`, `date`, `author`, `tags`, optional `excerpt`. Images go in
58-
`public/uploads/stories/<slug>/` and are referenced with absolute `/uploads/...` paths.
59-
- **An activity:** add `src/content/activities/<slug>.md` (`name`, `status`, `logo`,
60-
`tags`, `to`, `catchphrase`, `featured_image`, `contact_info`, `members`).
61-
- `status: active` shows it under **"Active now"** on `/activities` and on the home page.
62-
- `status: past` (the default) files it under **"Past activities"**.
63-
- With no active activities, the home page and `/activities` show an invitation to
64-
start one instead of an empty grid.
65-
- **Home / About / Team:** edit `src/content/pages/{home,about,team}.md`.
66-
- **Nav / footer / contact:** edit `src/config/site.ts`.
104+
- Deep purple `#301948` and electric purple `#641bff`
105+
- Headings in **Work Sans**, body in **Chivo**
67106

68-
## Brand
107+
## 📣 Newsletter
69108

70-
- Deep purple `#301948` (`brand`), electric purple `#641bff` (`electric`)
71-
- Titles: Work Sans · Body: Chivo
109+
The signup form posts to an [n8n](https://n8n.io) automation
110+
(`automation.openknowledge.be`) that stores subscribers. The endpoint lives in
111+
[`src/config/site.ts`](src/config/site.ts).
72112

73-
## Notes
113+
## 📄 License
74114

75-
- The old Gatsby + Netlify CMS site was migrated with `scripts/migrate-content.mjs`
76-
(kept for reference).
77-
- The newsletter form currently falls back to a `mailto:` subscribe. Wire a real
78-
endpoint by passing `action` to `<NewsletterCTA>`.
115+
Code is released under the [MIT License](LICENSE). Site content is © Open Knowledge Belgium,
116+
shared under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) unless noted otherwise.

0 commit comments

Comments
 (0)