The website editor (Pages CMS): admin guide
Staff edit Events, other calendar dates and Spotlights through
Pages CMS, a free, open-source editor for content kept
in a GitHub repository. The staff guide is staff-guide.md.
How it works
- Content lives in this repository, one file per item:
_events/,_dates/,_spotlights/. The forms staff see are defined in.pages.yml. - Save commits straight to
main, and GitHub Pages rebuilds the site within a couple of minutes. An item is on the site only once Published on the website is ticked; until then it is a draft (see “Drafts and review” below). - Staff do not need GitHub accounts. They are invited by email and sign in
with a 6-digit emailed code. Only admins with GitHub accounts can invite or
remove people, or change
.pages.yml. - After each save,
.github/workflows/content-check.yml:- tidies what was saved and commits it back: rewrites the front matter so
Jekyll reads times and yes/no words exactly as typed (the editor writes
YAML 1.2, Jekyll reads 1.1, where an unquoted
09:00is the number 540), and shrinks, rotates and strips metadata (EXIF and XMP, keeping the colour profile) from pictures added since the last tidy-up. “Since the last tidy-up” is the tagcontent-tidied, which the workflow moves forward, so a save whose own run was dropped from GitHub’s queue is still covered. Pictures already on the site before this was set up are never touched; - checks the content (
scripts/validate_event_booking.py) and the editor config (scripts/check_cms_config.py); - builds the site with the exact builder GitHub Pages uses;
- if any of 1-3 fails, opens an issue labelled content-check explaining what is wrong in plain English. It closes the issue automatically when a later save passes.
GitHub Pages publishes
mainregardless, so this cannot block a save. If the build fails, visitors keep seeing the previous version. If only the content check fails, the item is live but needs fixing. - tidies what was saved and commits it back: rewrites the front matter so
Jekyll reads times and yes/no words exactly as typed (the editor writes
YAML 1.2, Jekyll reads 1.1, where an unquoted
One-time setup
You need a GitHub account with admin (or write) access to
eeg101-costaction/website. Plan on two admins, so access never depends on one
person.
- Watch the repository so you get the issue emails: on github.com/eeg101-costaction/website, choose Watch → Custom → Issues.
- Go to https://app.pagescms.org and Sign in with GitHub.
- When asked to install the Pages CMS GitHub App, choose Only select repositories and select eeg101-costaction/website only. Read the permissions it asks for before approving: it needs to read and write repository contents. If it asks for more than you are comfortable with, stop and check with the other admin.
- Open the repository in Pages CMS. You should see Events, Other
calendar dates and Spotlights. If you see an error about the
configuration,
.pages.ymlhas a problem;python3 scripts/check_cms_config.pyexplains most of them. - Test it before inviting anyone. Open an existing event, change nothing,
and press Save. Then check:
- the commit appears on
main; - the Check content saved in the website editor workflow goes green;
- the event still looks the same on www.eeg101.eu/events/.
The first save may reformat the file (quotes, field order), which is harmless.
- the commit appears on
- Invite staff: in Pages CMS open Collaborators for the repository and
add each person’s email address. Send them
docs/staff-guide.md. Remove people from the same screen when they leave.
Drafts and review
- Every item has Published on the website (
published) and Ready for review (ready_for_review) ticks._config.ymldefaults all three collections topublished: false, so an item is live only when its file sayspublished: true: a new item, or a file missing the field, stays a draft. Jekyll leaves drafts out of the site completely (pages, lists, calendar, booking data, sitemap). - Drafts are shown at /drafts/ (
drafts.md, unlinked,noindex). Because Jekyll does not build drafts, the content check copies them into_data/drafts.ymlafter every save (scripts/export_drafts.py); the page renders them with the live templates. - Ticking Ready for review opens a GitHub issue labelled
ready-for-review (
scripts/review_requests.cjs) naming the people incontent_reviewersin_data/site.yml, and emails the reviewers through the booking Apps Script (sendReviewRequestinscripts/google-apps-script/event-hub.gs, sent from the account that deployed it). When the item is published they get a short “now live” note. Publishing the item, unticking Ready for review or deleting it closes the issue.
Setting up the review emails (once)
The reviewers’ addresses are stored only in the Apps Script’s settings, never in this public repository.
- Open the booking Apps Script project (the one whose web-app URL is
event_booking_endpointin_data/site.yml). Replace its code withscripts/google-apps-script/event-hub.gsfrom this repository and save. - Deploy → Manage deployments → ✏️ (edit) → Version: New version → Deploy. Editing the existing deployment keeps the same web-app URL.
- Project Settings (⚙️) → Script properties → Add script property:
EEG101_REVIEWER_EMAILS= the reviewers’ addresses, separated by commas. - In the editor, choose createReviewToken in the function list and press Run. Copy the long code it prints in the execution log.
- On GitHub: Settings → Secrets and variables → Actions → New repository
secret, name
EEG101_REVIEW_TOKEN, paste the code, Add secret.
To test: tick Ready for review on a draft and save. Within a few minutes the
reviewers get an email from “EEG101 website”, and the issue is opened. If the
email could not be sent, the issue says why (most often a missing secret or
property). To change reviewers, edit EEG101_REVIEWER_EMAILS (and the names in
_data/site.yml). At most 30 review emails are sent a day, and only with links
to the EEG101 site and editor, so a leaked secret cannot be misused for spam.
- Limits: the editor has no roles, so anyone invited can publish; review is a team rule. Drafts are public in the repository.
Day to day
- A content-check issue arrives. It says what is wrong and which item. Fix it in the editor (or ask the person who saved it), save, and the issue closes. To undo a save entirely, open the commit linked in the issue and Revert it.
- Adding a field to a form. Edit
.pages.yml, then runpython3 scripts/check_cms_config.py. Never name a fieldurl,next,id,content,path,output,excerpt,collectionorprevious: Jekyll reserves these on collection items and silently ignores them. Both checkers reject them. - Ids and web addresses. An event’s id and a Spotlight’s address are its filename, made once from the title (and date). Renaming is switched off in the editor, because the booking form, its workbook tab and shared links depend on it. If one is badly wrong before anyone has booked or linked to it, rename the file in GitHub.
Limits and risks
- Third-party service. app.pagescms.org is free and run essentially by one
maintainer, with no service agreement. If it changes or disappears, the
website keeps working and all content stays here as plain files; only the
editor is lost until it is replaced. The code is open source (MIT) and can be
self-hosted; another git-based editor could also use the same files, mainly by
rewriting
.pages.yml. - Removing access. To cut Pages CMS off completely, uninstall its GitHub App (GitHub → Settings → Applications → Installed GitHub Apps).
- Everything saved is public, including in the repository history, even if later deleted. That is why internal calendar items stay in the internal Google Calendar.
- Picture uploads are committed to the repository as uploaded, and only then cleaned up. The original, including any location data in it, stays in the public history; the staff guide asks people to remove location before uploading. Removing it from history needs a history rewrite. Uploads are limited to JPG, PNG and WebP, the types the clean-up handles.