Skip to content

Commit 77d43cf

Browse files
authored
Merge branch 'ep2026' into ep2026-finaid
2 parents 675d316 + 5225d15 commit 77d43cf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/pages/session/[slug].astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ const { entry } = Astro.props;
2626
const slug = entry.id;
2727
const speakers = await getEntries(entry.data.speakers);
2828
29+
// Sort speakers according to Issue #1282 rules
30+
speakers.sort((a, b) => {
31+
const aNoPicAndBio = !a.data.avatar && !a.data.biography;
32+
const bNoPicAndBio = !b.data.avatar && !b.data.biography;
33+
34+
if (aNoPicAndBio && !bNoPicAndBio) return 1;
35+
if (!aNoPicAndBio && bNoPicAndBio) return -1;
36+
37+
// Otherwise, sort by first name (alphabetical)
38+
return a.data.name.localeCompare(b.data.name);
39+
});
40+
2941
// Resolve session codes to session data
3042
const resolveSessions = (codes: string[]) =>
3143
codes.map((code) => sessions.find((s) => s.data.code === code)!);

0 commit comments

Comments
 (0)