This README explains how to use the content.json file to edit the site’s pages, where to place images and downloadable files, and how to update content without modifying component code directly.
All page content lives in content/ as various JSON files. Each JSON file corresponds to a section of the site:
-
home
Contains:subheading(string)info_title(string)info(string with\n\nfor line breaks)
-
publicationsitems: an array of publication objects{ "title": "...", "author": "...", "date": "...", "citation": "...", "link": "...", "description": "...", "img_src": "/images/your_image.png" }- If
img_srcis a non‐empty string, the Publications page will render an<Image>from/public/images/. If empty, no image is shown.
-
faqitems: an array of{ question: string, answer: string }. Line breaks inanswercan be represented by\n\n.
-
aboutcurrent: array of people currently in the groupformer: array of former people
Each person object:
{ "name": "Full Name", "role": "Title/Role", "image": "/filename.png" }- If
"image"is empty (""), that card will render without a photo.
-
updates- Array of update objects
{ "version": "x.x.0", "date": "2025-01-30", "releaseNotes": [ { "type": "Security update", "description": "Lorem ipsum…" }, { "type": "Patch", "description": "Details…" } ], "changelog": ["Feature A: …", "Feature B: …"] } - The sidebar and index page automatically read from this array. To add, remove, or reorder update links, edit
content.updates.
- Array of update objects
-
tutorials- Keys:
introduction,tutorials introduction: single tutorial objecttutorials: array of tutorial objects{ "heading": "Tutorial Title", "markdown_text": "Markdown content for the tutorial" }
- Keys:
-
Save all image files under
public/.- Example path:
public/images/francesco.png - In
content.json, refer to/images/francesco.png.
- Example path:
-
The React components use Next.js’ built‐in
<Image>component (which looks inpublic/automatically).- If
content.about.current[i].image === "test.png", the<Image>will resolve topublic/test.png. - Do not include
publicin the JSON path—omit it. Always start with/....
- If
-
Save files under
public/downloads/.- Example: if you place
MBX_v1.2.zipinpublic/downloads/MBX_v1.2.zip, then incontent.download.versionsset"link": "/downloads/MBX_v1.2.zip". - Next.js serves everything in
public/at root, so the download button’shref="/downloads/MBX_v1.2.zip"will work out of the box.
- Example: if you place
-
In
content.json:{ "version": "1.2", "date": "20 August 2024", "size": "15.4MB", "type": "GitHub", "link": "/downloads/MBX_v1.2.zip" } -
The “Download”
<button>inapp/download/page.tsxshould be replaced (if needed) with:<a href={item.link} download> <button>Download</button> </a>
to trigger a download rather than navigation.
- Open
content/in your editor. - Locate the JSON file for the page you want to modify (e.g.
"updates","about","publications", etc.). - For each array item or sub‐object, update titles, dates, descriptions, or file paths.
- Always maintain correct JSON syntax (commas, quotes, brackets).
- Save. The dev server (if running with
npm run dev) will hot‐reload and reflect your changes immediately.
npm installnpm run devhttp://localhost:3000This project uses ESLint and Prettier to ensure code quality and consistent formatting.
To manually check for linting errors, run:
npm run lint-checkTo automatically fix linting errors, run
npm run lint-fixTo format your code with Prettier, run
npx prettier --write .On commit, linting checks are automatically run to ensure code quality. Fix any errors manually or using the above commands, then stage those changes to proceed.
On push, a secret scan is triggered to ensure no sensitive data is accidentally pushed.
To run Playwright tests, run
npm run testThis project is deployed via Vercel. The demo page can be found at '/demo'.
Any changes to the 'main' branch will trigger Playwright tests and auto-deployment to Vercel.
Branching + PR Guidelines (Work in Progress)
Link to Documentation (Work in Progress)