Skip to content

Migrate people.html to data-driven _data/people.yml; add scholar/bluesky/orcid icons#43

Merged
jmxpearson merged 12 commits into
masterfrom
claude/people-yaml-migration
May 12, 2026
Merged

Migrate people.html to data-driven _data/people.yml; add scholar/bluesky/orcid icons#43
jmxpearson merged 12 commits into
masterfrom
claude/people-yaml-migration

Conversation

@jmxpearson
Copy link
Copy Markdown
Member

Summary

Migrate lab people data from hardcoded Liquid markup in people.html into a structured _data/people.yml file. Adding or updating a member is now a one-line YAML edit; people.html becomes a thin data-driven loop. Pattern matches the Fraser Lab approach the original site report praised.

Also adds three new optional link icons (Google Scholar, Bluesky, ORCID) on top of the existing site/github/email/linkedin.

Schema

Two schemas in one file:

Current members — rich card with image, description, and any of seven optional links:

- name: Some Person
  title: PhD Student              # optional
  image: /images/someone.jpg
  desc: |
    Bio prose...
  github: https://github.com/...  # any of these are optional;
  scholar: https://...            # leave a key out and its icon
  bluesky: https://bsky.app/...   # just doesn't render.
  orcid: https://orcid.org/...

Former members — simpler alumni-list schema:

- name: Some Alum
  url: https://their-page/        # optional, wraps the name in <a>
  years: 2017-2020                # optional
  notes: joint with X             # optional, parenthetical
  outcome: Assistant Prof at Y    # optional, "→ outcome" trailing text

notes and outcome allow inline HTML for the existing complex cases (e.g. Shariq's "USC PhD → Deepmind", Sujal's Hart Fellow link).

New icons

Google Scholar, Bluesky, and ORCID use inline SVG (Simple Icons paths, CC0). The buttons reuse the existing .btn-social-icon shell with three new brand-colored classes in css/people.css. They sit alongside the existing FontAwesome-driven icons with matching size and shape.

Test plan

  • bundle exec jekyll build clean
  • vnu validates the rendered _site/people.html → 0 errors
  • lychee → 0 errors / 89 OK
  • scripts/check_image_refs.py clean on people.html
  • All seven current members render with their icons (verified by grep): 23 icons total = 4 (John) + 3+3+3+3+4+3 (grad students)
  • Former members render: name with optional link, years/notes parenthetical, outcome arrow — all 5 sections (postdocs, grads, RAs, undergrads) preserved
  • CI passes
  • Visual spot-check post-merge — should be visually identical to current for existing icons; new icons appear only on entries that set scholar/bluesky/orcid (currently just two grad students have scholar: set)

Notes

  • Sets up the alumni section the original report wanted — it's already there in people.html, just driven from data now.
  • Sets up a cleaner path toward Decap CMS / Tina later: editing YAML in a web UI is the path of least resistance for non-technical contributors.
  • I added an aria-label to each social-icon link while I was in there (the existing FontAwesome links had nothing for screen readers).

https://claude.ai/code/session_01S5QXfkxZBNSAf2Y1XAD8H7


Generated by Claude Code

claude and others added 5 commits May 12, 2026 13:29
Move lab member data out of hardcoded Liquid markup in people.html into a
structured _data/people.yml file. Adding or updating a member is now a
one-line YAML edit; people.html itself becomes a small data-driven loop.

Two schemas:
- Current members: rich card with image, description, and any of seven
  optional links (site, github, email, linkedin, plus scholar, bluesky,
  orcid as new additions). Rendered via _includes/person.html.
- Former members: simpler alumni list with name + optional url, years,
  notes parenthetical, and "→ outcome" trailing text. Free-form HTML
  is supported in notes/outcome for the existing complex cases (e.g.
  Shariq's "USC PhD → Deepmind", Sujal's Hart Fellow link).

The three new icons (scholar, bluesky, orcid) use inline SVG (from
Simple Icons, CC0) with brand-colored buttons styled in css/people.css
to match the existing bootstrap-social.css buttons.

No visible content changes for current entries (verified by checking
member names render and image alt text matches). The legacy
"Sample Blog Post" placeholder posts are unaffected.

This sets up the alumni-section feature from the original report
naturally: it's already there in people.html. It also makes future
moves toward a Decap CMS dramatically easier.
The new icons used .btn-social-icon, which has CSS that's designed for
the FontAwesome <i> child:
  .btn-social-icon > :first-child {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 100% !important; ...
  }
That forced the SVG to fill the button (width 100%, top 0, bottom 0,
left 0) which collided with my own SVG centering rules and produced an
invisible/distorted icon — most users saw just a colored square.

Use a fresh .person-svg-icon class instead, which doesn't inherit
btn-social-icon's first-child rules. Visually sized to match the
existing FA-based 34x34 social icons.

Also restore the always-emit <p><em>{{ person.title }}</em></p> in
person.html. The original template emitted the wrapper even when
title was undefined (which renders empty <p><em></em></p>); I'd made
it conditional, which slightly shifted card heights for members
without a title and contributed to Bootstrap 3 float reflow.
The home layout's body had `background-size: 80%` with no height set.
In quirks mode (pre-PR-#42, when no doctype existed) body filled the
viewport by default, so 80% scaled the [λ] logo nicely against the
full window. After adding DOCTYPE in #42 standards mode kicked in,
body shrinks to content height, and 80% scales against a much smaller
body — which pushed the floated DUSOM image into visual overlap with
the (now smaller) central [λ].

Setting min-height: 100vh restores the original visual.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Summary

Status Count
🔍 Total 730
✅ Successful 62
⏳ Timeouts 1
🔀 Redirected 26
👻 Excluded 641
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0

Errors per input

Errors in _site/learning.html

Full Github Actions output

claude and others added 7 commits May 12, 2026 13:52
Three changes:

1) _data/people.yml restructured to one list per role (postdocs,
   graduate_students, research_associates, undergraduates). Each
   entry has an optional `current` flag — absent or true means
   present member (renders as rich card), false means alumni
   (renders as list item under "Former members"). Moving someone
   to alumni is now one line: `current: false` plus optional
   `years` / `outcome`. Existing image/desc/social fields can be
   kept for historical reference; the template only renders the
   relevant subset.

2) people.html rewritten to filter each role list by `current`
   instead of reaching into nested `current.X` / `former.X`
   subtrees. Uses Liquid's where_exp + where filters.

3) css/people.css: removed `.col-md-5 { font-size: 0.8em }` so
   member descriptions render at default body font size (~1em).

4) home.html: changed background-size from 80% to `contain` so
   the [λ] logo always fits the viewport instead of getting
   clipped on the right edge.
The body-as-background-host approach kept getting tripped up: in
quirks mode body's box was viewport-sized so background-size: 80%
worked, but in standards mode the body grows to content height
(navbar + DUSOM image floats), can be wider than viewport because
of the float clearance, and `background-size: contain` against the
oversized body pushes the SVG center past the viewport edge —
visible as the "P[λ]ab" being clipped on the right.

Move the background to a position:fixed inset:0 div with z-index:-1
so it's always exactly viewport-sized and centered in the visible
area, regardless of what the body does. Drop the body's min-height
trick.

inset:0 spelled as top/right/bottom/left longhand since vnu's CSS
rules don't recognise the (newer-but-standard) inset shorthand.
Restructure _includes/person.html so each member is a single col-md-6
card with photo (circular, 200x200) centered on top, name + italic
title below, description, and a row of social icons. Two cards per
row on desktop; collapses to one on narrow.

Use flexbox on .row.full-width (the cards row) so cards with uneven
description lengths wrap cleanly instead of stair-stepping the way
Bootstrap 3's float grid does. Cards align at top; descriptions can
be different lengths without breaking the next row's alignment.
…m hook

The [λ] logo SVG has paths drawn outside its declared viewBox
(0 0 500.38751 243.89999). When PR #35's backfill ran svgo on every
SVG in the repo, the optimizer stripped attributes that were keeping
that overflow content visible at scale — so any time the SVG was
rendered larger than its natural 500x244 size, the "Lab" and the tail
of "Computation" got cut off (the home page background).

Restore the pre-svgo file (~8 KB larger; minor cost) and add an
exclude for it in the svgo pre-commit hook so a future maintainer
re-running the hook doesn't silently re-break the home page.

Verified by Playwright screenshot at 1400x900: both the home page
[λ] logo and the people page card grid render cleanly with the
CDN-loaded Bootstrap.
Two card-layout polish fixes:

1. _includes/person.html: only emit <p class="person-title"><em>...</em></p>
   when person.title is set. Previously the wrapper always rendered, and
   an empty <em></em> meant CSS :empty couldn't hide it — so members
   without a title (e.g. John) showed a thin blank line between name and
   description.

2. css/people.css: switch the cards row from align-items: flex-start to
   align-items: stretch so paired cards match height within a row. With
   flex-start, a card with a long description was taller than its row
   neighbor and the icon rows didn't visually line up; with stretch
   the two cards in a row are the same height so the layout reads as a
   proper grid.
@jmxpearson jmxpearson merged commit a538a72 into master May 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants