diff --git a/src/content/config.ts b/src/content/config.ts index c040f373..738224ee 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -2,7 +2,7 @@ import { defineCollection,z } from 'astro:content'; const setupCollection = defineCollection({ schema: z.object({ - title: z.string(), + title: z.string().optional(), needsEnv: z.array(z.string()), }), }); diff --git a/src/pages/setup/index.astro b/src/pages/setup/index.astro index 391be17e..51971970 100644 --- a/src/pages/setup/index.astro +++ b/src/pages/setup/index.astro @@ -25,8 +25,8 @@ const parsedSteps: { }[] = []; for (const slug of checksOrder) { const step = await getEntryBySlug('setup', slug); - const havePassed = step.data.needsEnv?.every((x) => { - const value = process.env[x] || import.meta.env[x]; + const havePassed = step.data.needsEnv.every((x) => { + const value = process.env[x] ?? import.meta.env[x]; return value !== undefined && value !== false; }); if (!havePassed && firstFail == '') { @@ -61,7 +61,7 @@ for (const slug of checksOrder) {

{i + 1}. {havePassed ? '✅ ' : ''} - {step.data.title || step.slug} + {step.data.title ?? step.slug}