Operating notes for AI coding assistants (Claude Code, Codex, etc.) working
in this repository. Treated as canonical; CLAUDE.md defers here.
Static Jekyll site for the CoMPhy (Computational Multiphase Physics) Lab — research publications, team profiles, teaching materials, lab news. Hosted on GitHub Pages at https://comphy-lab.org.
The site is mid-migration to a “v2” design language:
assets/css/tokens.css — design tokens (--c-* brand colours,
--t-* typography, --s-* spacing, --r-* radii). Single source of
truth.assets/css/bridge.css — loaded after tokens.css and
styles.css so its :root declarations win. Maps legacy
--color-*/--font-*/--shadow-* names onto v2 tokens, declares
shared component primitives (panel, eyebrow, lede, chip, btn-ghost,
paper-card, news-row, team-tile).home.css, team-v2.css, research-v2.css,
footer-v2.css, about-layout.css, shared-news-history.css,
join-us.css. Coexist with legacy styles.css, research.css,
team.css, teaching.css.When adding a new v2 page, prefer composing from bridge primitives over duplicating styles. Page-specific files only for genuinely page-specific rules.
Several pages render from YAML rather than handwritten HTML:
_data/hero.yml — homepage hero section (slides, copy, eyebrow)._data/news.yml — news items shown on the homepage and /news/
archive (date, kind, title, meta, action)._data/team.yml — present members, collaborators, alumni for the
team page (name, role, photo, bio)._data/research_themes.yml — research-themes block.The Jekyll collections (_research/, _team/, _teaching/, _join-us/)
still drive their own pages. Team is the one with both a YAML feed and a
collection, and _team/index.md is the rendered surface — the YAML is the
content.
_layouts/default.html — base layout, used by everything except the
collection-specific layouts below._layouts/research.html, team.html, teaching.html,
teaching-course.html, join-us.html, history.html — collection /
page layouts._includes/footer-v2.html — site footer (v2 footer is the only footer)._includes/theme-init.html, tokens-bridge.html, tokens-head.html —
early-load fragments for theme persistence and token wiring.command-palette.js must load before command-data.js (dependency
order; scripts/fix-script-order.sh enforces this).search_db.json) is generated and updated daily from
the comphy-lab/comphy-search
repository via GitHub Actions; not edited by hand here.:root for light, overridden under [data-theme="dark"].localStorage, applied early via theme-init.html
to avoid FOUC.<div class="tags"><span>TagName</span></div> in
_research/index.md.about.html — Jekyll permalink /about/, redirects to /. Plain JS
redirect with visible fallback link, mirrors the contact.html pattern.contact.html — Jekyll permalink /contact/, redirects to /join.# Initial setup (installs Ruby/Node.js if needed, runs preflight,
# installs Husky hooks, builds, validates)
./scripts/setup.sh
# Local dev server (auto-finds free port 4001-4999, live reload)
./scripts/deploy.sh
# Full build (Jekyll + search + SEO + filtered research)
./scripts/build.sh
# Or plain Jekyll
bundle exec jekyll serve
# Run before committing
./scripts/lint-check.sh
# Tests
npm test
npm test -- --coverage
npm test -- command-data.test.js
# Targeted fixers
./scripts/fix-script-order.sh # enforces command-palette.js first
./scripts/fix-js-line-length.sh # 80-char enforcement
./scripts/fix-quotes.sh # standardises to double quotes
# Lint teaching markdown locally (mirrors CI gate)
npx markdownlint-cli2 --config .markdownlint-cli2.jsonc \
"_teaching/**/*.md" "assets/images/teaching/README.md"
npx prettier --check "_teaching/**/*.md" "assets/images/teaching/README.md"
Add to _research/index.md in this exact form:
<h3 id="NUMBER">[NUMBER] Author1, A., **Author2, B.**, & Author3, C. Title. _Journal_, Volume, Pages (Year).</h3>
<div class="tags"><span>Tag1</span><span>Tag2</span><span>Featured</span></div>
[](URL)
**Name** for lab members.<span>Featured</span> to display on the homepage (max 2).id attribute enables direct linking: /research/#NUMBER.Edit _data/team.yml. The team page (_team/index.md + team.html
layout) renders from this data. Photo files live under
assets/images/team/ (1:1 crop, used at --r-md radius). Bio lines
are line-clamped per section (3 lines for present, 4 for collaborators,
unset for alumni).
/add-news "Your news content here" — see “Custom
slash commands” below._data/news.yml (the source of truth for the homepage
feed and /news/ archive), then mirror to News.md and history.md.
News.md keeps only the 5 most recent legacy items plus the pinned
Durham announcement; older items live on in history.md and
_data/news.yml.- News content under ### Month Year headers; pinned items
have no header. Months are reverse-chronological within each year._teaching/index.md (uses the teaching layout, sorts and
filters courses)._teaching/YYYY-CourseName-Location.md (uses
teaching-course layout)./assets/images/teaching/ — 600x400 for cards, 1200x400 for
banners.Enforced by lint-check.sh, but worth keeping in mind:
command-palette.js loads before command-data.js.theme-init.html runs as early as possible to avoid theme flash.Installed by setup.sh via Husky:
git commit --no-verify only in real emergencies.Maintained externally in
comphy-lab/comphy-search.
Updated daily via GitHub Actions and pulled into assets/js/search_db.json.
Includes blog content from blogs.comphy-lab.org. Manual trigger available
in the Actions tab.
The content-rules workflow validates history.md chronological
ordering and _research/index.md tag markup. Trigger paths must match
the validated-file set; scripts/check-content-rules-trigger-parity.py
enforces this. If you add a new file to the validator, also add its path
to .github/workflows/content-rules-checks.yml.
tests/setup.js.npm test -- command-data.test.js
npm test -- --watch
node scripts/simple-test.js # quick validation without Jest
scripts/build.sh runs (in order):
.s-header__nav-list, .news-item__body).bridge.css primitives where possible../scripts/lint-check.sh and npm test before committing.--no-verify) unless explicitly authorised.The canonical definitions for /add-news and the other content skills
live outside this repository (in the agent system that invoked them).
The repo previously contained an .agents/skills/ mirror, which was
removed deliberately to avoid drift. The notes below describe the
expected behaviour so non-agent contributors can follow the same recipe
manually.
Adds a news item to _data/news.yml, News.md, and history.md while
maintaining the 5-item limit on News.md. _data/news.yml is the
visible source for the homepage and /news/.
Workflow:
_data/news.yml in reverse-chronological
position with date, kind, title, meta, action_label,
action_href.### Month Year section in history.md.News.md in the same section.News.md exceeds 5, remove the
oldest from News.md only (history.md keeps everything).Rules:
- News content bullet form (dash + space + text).history.md; months descend within each year.