Add organizations, research groups and repo stats to projects

This commit is contained in:
SirBlob committed 2026-10-31 21:17:42 -04:00
1 parent 3fefc814e1
commit c820672803
25 files changed
+573 -32

No files matched your search

+19 -2
View File
@@ -4,20 +4,24 @@ import leadershipData from '#content/leadership.json';
import aboutData from '#content/about.json';
import desktopData from '#content/desktop.json';
import blogData from '#content/blog.json';
import musicData from '#content/music.json';
import openSourceData from '#content/projects/opensource.json';
import packagesData from '#content/projects/packages.json';
import hackathonsData from '#content/projects/hackathons.json';
import researchData from '#content/projects/research.json';
import organizationsData from '#content/projects/organizations.json';
import type {
AboutContent,
BlogSettings,
DesktopContent,
Experience,
Leadership,
Playlist,
Profile,
Project,
ProjectCategory,
ProjectCategoryId
ProjectCategoryId,
ResearchGroup
} from './types';
export type * from './types';
@@ -28,6 +32,8 @@ export const leadership: Leadership[] = leadershipData;
export const about: AboutContent = aboutData;
export const desktop: DesktopContent = desktopData;
export const blogSettings: BlogSettings = blogData;
export const playlist: Playlist = musicData;
export const researchGroups: ResearchGroup[] = researchData;
function featuredFirst(projects: Project[]): Project[] {
return [...projects].sort((first, second) => Number(!!second.featured) - Number(!!first.featured));
@@ -60,7 +66,18 @@ export const projectCategories: ProjectCategory[] = [
title: 'Research',
icon: 'ph:microscope-duotone',
summary: 'Research roles, projects, and publications.',
projects: featuredFirst(researchData)
projects: featuredFirst(
researchGroups.flatMap((group) =>
group.projects.map((project) => ({ ...project, organization: project.organization ?? group.shortName }))
)
)
},
{
id: 'organizations',
title: 'Organizations',
icon: 'ph:users-three-duotone',
summary: 'Clubs and teams I lead and help run.',
projects: featuredFirst(organizationsData)
}
];