From 23e5e17be574f956f7cdff7f4be2f8d574dea146 Mon Sep 17 00:00:00 2001 From: patrick Date: Thu, 14 May 2026 12:49:57 -0400 Subject: [PATCH] feat: add support for multiple links in projects Projects now support multiple links (source code, demo, etc) each with a label. Migrated all projects to use the new schema. --- src/content.config.ts | 5 +++- src/content/projects/bullseye.md | 4 ++- src/content/projects/chitai.md | 4 ++- src/content/projects/cue.mdx | 2 +- src/content/projects/druksubli.md | 4 ++- src/content/projects/homelab.md | 4 ++- src/content/projects/portfolio.md | 6 ++++- src/pages/projects/[...id].astro | 44 ++++++++++++++++++++++--------- 8 files changed, 54 insertions(+), 19 deletions(-) diff --git a/src/content.config.ts b/src/content.config.ts index 5f29060..929559a 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -24,7 +24,10 @@ const projects = defineCollection({ description: z.string(), tags: z.array(z.string()), image: image(), - link: z.url().optional(), + links: z.array(z.object({ + label: z.string(), + url: z.url() + })).optional(), order: z.number().optional(), startDate: z.coerce.date().optional(), endDate: z.coerce.date().optional(), diff --git a/src/content/projects/bullseye.md b/src/content/projects/bullseye.md index 6c438c3..5250362 100644 --- a/src/content/projects/bullseye.md +++ b/src/content/projects/bullseye.md @@ -3,7 +3,9 @@ name: 'Bullseye' description: 'Bullseye is a self-hosted offline-first personal utilities app with habit tracking, tasks, and notes.' tags: ['typescript', 'svelte', 'sqlite'] image: '../../../public/static/bullseye.webp' -link: 'https://git.jaroszew.ski/patrick/bullseye-app' +links: + - label: 'Source Code' + url: 'https://git.jaroszew.ski/patrick/bullseye-app' order: 6 startDate: '2025-03-30' --- diff --git a/src/content/projects/chitai.md b/src/content/projects/chitai.md index 00e913c..dd0d00a 100644 --- a/src/content/projects/chitai.md +++ b/src/content/projects/chitai.md @@ -3,7 +3,9 @@ name: 'Chitai' description: 'Chitai is a self-hosted eBook management application' tags: ['python', 'typescript', 'postgresql', 'svelte', 'open-source'] image: '../../../public/static/chitai.webp' -link: 'https://git.jaroszew.ski/patrick/chitai' +links: + - label: 'Source Code' + url: 'https://git.jaroszew.ski/patrick/chitai' order: 2 startDate: '2025-03-30' --- diff --git a/src/content/projects/cue.mdx b/src/content/projects/cue.mdx index 14306be..b049de4 100644 --- a/src/content/projects/cue.mdx +++ b/src/content/projects/cue.mdx @@ -8,7 +8,7 @@ startDate: '2025-09-23' ---
- Python + Python PostgreSQL TypeScript Svelte diff --git a/src/content/projects/druksubli.md b/src/content/projects/druksubli.md index 9b27611..90e3ee5 100644 --- a/src/content/projects/druksubli.md +++ b/src/content/projects/druksubli.md @@ -3,7 +3,9 @@ name: 'Marketing Site' description: 'A simple marketing site built for a small business.' tags: ['astro', 'tailwindcss'] image: '../../../public/static/druksubli.webp' -link: 'https://druksubli.pl' +links: + - label: 'Live Site' + url: 'https://druksubli.pl' order: 5 startDate: '2025-04-16' endDate: '2025-05-29' diff --git a/src/content/projects/homelab.md b/src/content/projects/homelab.md index 715a47f..c7511e4 100644 --- a/src/content/projects/homelab.md +++ b/src/content/projects/homelab.md @@ -3,7 +3,9 @@ name: 'Homelab' description: 'My homelab is where I tinker and learn new technologies.' tags: ['proxmox', 'networking', 'hardware'] image: '../../../public/static/homelab.webp' -link: 'https://git.jaroszew.ski/ansible' +links: + - label: 'Ansible Configs' + url: 'https://git.jaroszew.ski/ansible' order: 1 startDate: '2023-05-15' --- diff --git a/src/content/projects/portfolio.md b/src/content/projects/portfolio.md index ab8d2a9..701a9c6 100644 --- a/src/content/projects/portfolio.md +++ b/src/content/projects/portfolio.md @@ -3,7 +3,11 @@ name: 'Personal Portfolio' description: 'Personal Portfolio is a personal website that showcases my work and projects. It is built with Astro.js and styled with Tailwind CSS, providing a fast and responsive user experience. The website features a clean design, easy navigation, and a focus on showcasing my skills and projects.' tags: ['astro', 'tailwindcss', 'typescript', 'svelte'] image: '../../../public/static/portfolio.webp' -link: 'https://patrick.jaroszew.ski' +links: + - label: 'Live Site' + url: 'https://patrick.jaroszew.ski' + - label: 'Source Code' + url: 'https://git.jaroszew.ski/patrick/portfolio' order: 4 startDate: '2026-03-10' --- diff --git a/src/pages/projects/[...id].astro b/src/pages/projects/[...id].astro index 1ee375c..5aa87fb 100644 --- a/src/pages/projects/[...id].astro +++ b/src/pages/projects/[...id].astro @@ -126,18 +126,28 @@ const currentUrl = Astro.url;

{project.data.description}

- {project.data.link && ( + {(project.data.links || project.data.link) && ( <>

Project Links

@@ -155,18 +165,28 @@ const currentUrl = Astro.url;

{project.data.description}

- {project.data.link && ( + {(project.data.links || project.data.link) && ( <>

Project Links