Everything that is not a profile, project, news article or publication lives in the
website repository (opens in a new tab). A push to its main branch
deploys the live site, so make changes on a branch and merge them through a pull request.
Google Forms
MARC members can send profiles and news with Google Forms instead of GitHub. Every night at 00:00 Sri Lanka time, a workflow reads each form’s response sheet and opens pull requests:
- Profile form: the Profile Form Sync workflow opens pull requests in marc_people with the
new or updated profile and its photo, and in marc_projects adding the person to the projects they
ticked. Secret:
GOOGLE_FORM_CSV_LINK, in both repositories. Setup: marc_people/google-form (opens in a new tab). - News form: the News Form Sync workflow opens pull requests in marc_news with the new or
corrected article and its photos. Secret:
NEWS_FORM_CSV_LINK. Setup: marc_news/google-form (opens in a new tab).
Responses that can’t be used become an issue instead. Each pull request lists what changed, who sent it and the validator result, with a short review checklist. Merge to publish or close to reject; a response is never proposed twice. To process new responses straight away, run the workflow from the repository’s Actions tab.
The setup guides cover the form, sharing, the secret and maintenance. Once a form exists, put its share
link in forms.profile or forms.news in src/data/site.ts so the guides show it.
Where things are
| What | Where |
|---|---|
| Home page photo collage | Photos in src/assets/home/; their descriptions in homePhotos in src/data/site.ts. See src/assets/home/README.md. |
| Home page research highlights | highlights in src/data/site.ts |
| Research areas (text and cover images) | One Markdown file per area in src/data/research/ |
| About page text, mission and vision | statements and ecosystem in src/data/site.ts |
| Leadership and advisors on the About page | leadership in src/data/site.ts |
| Contact details, address, email, telephone | site in src/data/site.ts |
| Social media links | socials in src/data/site.ts |
| Main menu and footer links | nav and footerColumns in src/data/site.ts |
| Publications sheet tabs with a different name from their project | projectPublicationTabs in src/data/site.ts |
| These documentation pages | src/pages/docs/ (one Markdown file per guide) |
Home page photos
Put 1 to 5 landscape photos (at least 1600 pixels wide) in src/assets/home/, named 01-….jpg,
02-….jpg and so on; the first is the large one. Add a description of each to homePhotos.alt in
src/data/site.ts. Only use photos MARC has the right to publish, with consent from anyone recognisable
in them.
Research areas
Each file in src/data/research/ is one research area:
---
title: Smart Grid
coverImage: Smart_Grid_Cover.png
short: >
One paragraph shown on the research area cards.
---
The full description shown on the research area page.
The title must match the researchArea value that projects use, or the projects will not be listed
under the area.
Preview the site on your computer
With Node.js (opens in a new tab) installed and the content repositories checked out next to the
website (marc_people, marc_projects and marc_news in the same parent folder):
npm install
npm run dev:local
npm run build:local
npm run dev:local starts a preview at http://localhost:4321 (opens in a new tab) using your local content checkouts, and
npm run build:local makes a full production build in dist/. npm run dev (without :local) uses
the copies in src/collection_* instead. To refresh the
publications and social feed data from the Google Sheets, run uv run python_scripts/get_data.py.
Deployment
The live site is built and deployed by the Deploy to GitHub Pages workflow. It runs when:
- a change is pushed to the website’s
mainbranch; - a change is merged into
mainin one of the content repositories; - every Monday at 00:00 Sri Lanka time (Sunday 18:30 UTC), to pick up changes in the Google Sheets (publications and the social feed);
- a maintainer runs it by hand from the Actions tab (Run workflow), for example after editing the Google Sheets.
GitHub turns off scheduled runs in a public repository after 60 days without any commits. If that happens, GitHub emails the repository admins and the workflow shows a banner in the Actions tab; select Enable workflow to turn the weekly rebuild back on.
Pull requests to the website are built (but not deployed) by the PR Build Check workflow, so problems show up before merging.