--- import { getCollection } from 'astro:content'; import Base from '../../layouts/Base.astro'; import { media } from '../../lib/media'; export async function getStaticPaths() { const games = await getCollection('work', ({ data }) => !!data.game); return games.map((project) => ({ params: { slug: project.id }, props: { project } })); } const { project } = Astro.props; const game = project.data.game!; const src = media(`${game.path}/${game.entry}`); --- ← {project.data.title} {project.data.title} {game.engine === 'godot' ? 'Godot' : game.engine === 'unity' ? 'Unity' : 'Web'} build ▶ Click to play Fullscreen Open in new tab ↗ Click into the game to give it keyboard focus.