diff --git a/src/components/keynoters/keynoter.astro b/src/components/keynoters/keynoter.astro index 9767b0337..2de3f3aca 100644 --- a/src/components/keynoters/keynoter.astro +++ b/src/components/keynoters/keynoter.astro @@ -1,5 +1,6 @@ --- import type { ImageMetadata } from "astro"; +import { getCollection } from "astro:content"; import { Image } from "astro:assets"; import Person1 from "../placeholders/person-1.astro"; import Person2 from "../placeholders/person-2.astro"; @@ -19,6 +20,7 @@ export interface Props { const { name, + slug, tagline, image, placeholder, @@ -30,10 +32,12 @@ const placeholders = [Person1, Person2, Person3, Person4, Person5]; const Placeholder = placeholders[Math.floor(Math.random() * placeholders.length)]; +const entries = await getCollection("speakers"); +const isSpeaker = entries.some((entry) => entry.id === slug); ---
  • - +
    { image ? ( @@ -51,21 +55,30 @@ const Placeholder = }
    -