Initial portfolio site
Mirror to Gitea / mirror (push) Skipped

Astro + React islands + MDX with a theme system (terminal, concrete,
nostromo, overgrowth), USMT Dash case study, work/log/sound/models/about/
contact pages, RSS, self-hosted contact form over SMTP, /media proxy to
Nextcloud, Dockerfile for Coolify, and a GitHub Action that mirrors main
to Gitea.
This commit is contained in:
Johan Sandoval committed 2026-10-08 14:41:39 +00:00
commit b2cd67e74f
64 files changed
+9066

No files matched your search

+90
View File
@@ -0,0 +1,90 @@
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
import { THEMES } from './lib/themes';
const theme = z.enum(THEMES).optional();
export const DISCIPLINES = ['software', 'web', 'game', 'hardware', '3d', 'music'] as const;
/**
* Projects. One .md/.mdx file per project in src/content/work/.
* Folder-style entries (work/my-thing/index.mdx) can keep their images alongside.
*/
const work = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/work' }),
schema: ({ image }) =>
z.object({
title: z.string(),
summary: z.string(),
disciplines: z.array(z.enum(DISCIPLINES)).min(1),
stack: z.array(z.string()).default([]),
date: z.coerce.date(),
status: z.enum(['live', 'shipped', 'in-progress', 'archived']).default('shipped'),
role: z.string().optional(),
cover: image().optional(),
coverAlt: z.string().optional(),
links: z
.array(z.object({ label: z.string(), href: z.string() }))
.default([]),
// Playable build served from /media (see src/pages/play/[slug].astro)
game: z
.object({
engine: z.enum(['godot', 'unity', 'web']),
// folder inside the media share, e.g. "games/my-game"
path: z.string(),
entry: z.string().default('index.html'),
aspect: z.string().default('16 / 9'),
})
.optional(),
// .glb in the media share, shown with <model-viewer>
model: z.string().optional(),
featured: z.boolean().default(false),
placeholder: z.boolean().default(false),
theme,
}),
});
/** Weekly log / blog. */
const log = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/log' }),
schema: ({ image }) =>
z.object({
title: z.string(),
summary: z.string(),
date: z.coerce.date(),
tags: z.array(z.string()).default([]),
cover: image().optional(),
coverAlt: z.string().optional(),
draft: z.boolean().default(false),
theme,
}),
});
/** Recordings. Audio files live in the media share under sound/. */
const sound = defineCollection({
loader: glob({ pattern: '**/*.{md,yaml,yml,json}', base: './src/content/sound' }),
schema: z.object({
title: z.string(),
date: z.coerce.date(),
file: z.string(),
duration: z.string().optional(),
notes: z.string().optional(),
gear: z.array(z.string()).default([]),
}),
});
/** 3D models. .glb files live in the media share under models/. */
const models = defineCollection({
loader: glob({ pattern: '**/*.{md,yaml,yml,json}', base: './src/content/models' }),
schema: z.object({
title: z.string(),
date: z.coerce.date(),
file: z.string(),
poster: z.string().optional(),
tools: z.array(z.string()).default([]),
notes: z.string().optional(),
}),
});
export const collections = { work, log, sound, models };