From 5afbfc74e90172ee3f62c7c12da935134801c04c Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Fri, 7 Aug 2026 07:03:53 +0100 Subject: [PATCH 1/4] COR-111 changes --- src/pages/working-groups/index.astro | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/pages/working-groups/index.astro b/src/pages/working-groups/index.astro index 2c6b19b..1d3f157 100644 --- a/src/pages/working-groups/index.astro +++ b/src/pages/working-groups/index.astro @@ -33,6 +33,7 @@ const data = [ description: 'Targeting application layer support for Windows. From tooling to enablement and optimization of libraries on the Windows platform', googlegroupname: 'windows-on-arm', + githubUrl: 'https://github.com/CoreCollective-dev/windows-on-arm-wg', }, { title: 'Android', @@ -94,8 +95,10 @@ const data = [ > { data.map((item, index) => { - const targetUrl = item.archiveUrl || (item.googlegroupname ? `https://groups.google.com/u/0/a/corecollective.dev/g/${item.googlegroupname}` : null); - const linkText = item.archiveUrl ? 'Learn More' : 'List Archive'; + const archiveUrl = item.archiveUrl || (item.googlegroupname ? `https://groups.google.com/u/0/a/corecollective.dev/g/${item.googlegroupname}` : null); + const archiveText = item.archiveUrl ? 'Learn More' : 'List Archive'; + // The title links to the GitHub URL when provided, otherwise to the archive/group. + const titleUrl = item.githubUrl || archiveUrl; return (
  • @@ -111,8 +114,8 @@ const data = [

    - {targetUrl ? ( - + {titleUrl ? ( + {item.title} ) : ( @@ -126,10 +129,18 @@ const data = [ {item.description}

    - {targetUrl && ( + {item.githubUrl && (

    - - {linkText} + + Learn More + +

    + )} + + {archiveUrl && ( +

    + + {archiveText}

    )} From 55fe3cc88265eebb692ef0209630f7950d241840 Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Fri, 7 Aug 2026 07:13:56 +0100 Subject: [PATCH 2/4] Rearrange learn more / list archive links --- src/pages/working-groups/index.astro | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/pages/working-groups/index.astro b/src/pages/working-groups/index.astro index 1d3f157..4ae04b9 100644 --- a/src/pages/working-groups/index.astro +++ b/src/pages/working-groups/index.astro @@ -129,19 +129,18 @@ const data = [ {item.description}

    - {item.githubUrl && ( -

    - - Learn More - -

    - )} - - {archiveUrl && ( -

    - - {archiveText} - + {(item.githubUrl || archiveUrl) && ( +

    + {item.githubUrl && ( + + Learn More + + )} + {archiveUrl && ( + + {archiveText} + + )}

    )} From 737db20a96aeaf4c3b4a31995d9438631d7302cf Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Tue, 11 Aug 2026 08:53:04 +0100 Subject: [PATCH 3/4] Add working group sub-pages --- src/components/Note.astro | 14 ++++ src/content/config.ts | 9 ++ src/content/working-groups/windows-on-arm.mdx | 57 +++++++++++++ src/pages/working-groups/[slug].astro | 84 +++++++++++++++++++ src/pages/working-groups/index.astro | 15 +++- 5 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 src/components/Note.astro create mode 100644 src/content/working-groups/windows-on-arm.mdx create mode 100644 src/pages/working-groups/[slug].astro diff --git a/src/components/Note.astro b/src/components/Note.astro new file mode 100644 index 0000000..386c743 --- /dev/null +++ b/src/components/Note.astro @@ -0,0 +1,14 @@ +--- +interface Props { + label?: string; +} + +const { label = 'Note' } = Astro.props; +--- + +
    +

    + {label}: + +

    +
    diff --git a/src/content/config.ts b/src/content/config.ts index 7dd30fb..1c5789f 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -46,9 +46,18 @@ const faqCollection = defineCollection({ ), }); +const workingGroupsCollection = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + description: z.string(), + }), +}); + export const collections = { blogs, logos: logosCollection, leadership: leadershipCollection, faq: faqCollection, + 'working-groups': workingGroupsCollection, }; diff --git a/src/content/working-groups/windows-on-arm.mdx b/src/content/working-groups/windows-on-arm.mdx new file mode 100644 index 0000000..553f0ec --- /dev/null +++ b/src/content/working-groups/windows-on-arm.mdx @@ -0,0 +1,57 @@ +--- +title: Windows on Arm Working Group +description: Targeting application layer support for Windows. From tooling to enablement and optimization of libraries on the Windows platform. +--- + +import Note from '../../components/Note.astro'; + +The CoreCollective Windows on Arm (WoA) Working Group supports a growing +self-sustaining Arm open source ecosystem for Windows. + +In this repo, you can find info about our projects & +[file issues](https://github.com/CoreCollective-dev/windows-on-arm-wg/issues) +for the working group to review and discuss. + +## Mailing List + +- [Mailing list archive](https://groups.google.com/a/corecollective.dev/g/windows-on-arm) +- Email **windows-on-arm+subscribe@corecollective.dev** from your company email domain + + + Subscriptions are restricted to company email domains of current members. + Ensure you're not emailing from a browser where you're also logged in to a Google account. + If you don't receive a confirmation email within an hour, + file a GitHub issue to notify the WoA WG community manager. + + +## Projects + +- Supporting Python packages natively on Windows on Arm — [Status](https://github.com/khmyznikov/PyEnv-WoA-State) +- LLVM +- GCC +- Software product enablement + - [What works on Windows on Arm?](https://worksonwoa.com/) + - [Windows on Arm Software Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/windows) + - [Tools for Arm development](https://learn.microsoft.com/en-us/windows/arm/overview#find-tools-for-arm-development), including: + - [VS Code extension with GitHub Copilot chat integration for porting x64 Windows applications to Arm64](https://github.com/qualcomm/extension-wos-porter/) + - [Arm AppReady: developer resources, tooling guidance, and engineering support for building native applications for WoA](https://developer.arm.com/laptops-and-desktops/windows-app-ready) +- [FFMPEG ARM64EC binaries are now publicly available](https://github.com/Multicorewareinc/FFmpeg/releases) + +## Package and App Status (historic) + +If you are looking for status or build instructions for Windows on Arm on a specific project, +[here is a list](https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28682879341/Detailed+How-To+and+Status+sub+pages) +of the historic status and work carried out up to end of 2025. + +## WG Members + +- Arm +- CIX +- Linaro +- Microsoft +- Qualcomm + +## Resources + +- [GitHub Repository](https://github.com/CoreCollective-dev/windows-on-arm-wg) +- [Mailing List Archive](https://groups.google.com/a/corecollective.dev/g/windows-on-arm) diff --git a/src/pages/working-groups/[slug].astro b/src/pages/working-groups/[slug].astro new file mode 100644 index 0000000..64bac84 --- /dev/null +++ b/src/pages/working-groups/[slug].astro @@ -0,0 +1,84 @@ +--- +import { getCollection } from 'astro:content'; +import BaseLayout from '../../layouts/BaseLayout.astro'; +import Contact from '../../components/Contact.astro'; +import backgroundImage from '../../assets/ccbgd3.png'; + +export async function getStaticPaths() { + const entries = await getCollection('working-groups'); + return entries.map((entry) => ({ + params: { slug: entry.slug }, + props: { entry }, + })); +} + +const { entry } = Astro.props; +const { Content } = await entry.render(); +--- + + +
    +
    + + +
    +
    +
    + +
    +
    +

    + {entry.data.title} +

    +

    + {entry.data.description} +

    +
    + +
    + +
    +
    +
    +
    +
    + +
    diff --git a/src/pages/working-groups/index.astro b/src/pages/working-groups/index.astro index 4ae04b9..3528cbe 100644 --- a/src/pages/working-groups/index.astro +++ b/src/pages/working-groups/index.astro @@ -33,6 +33,7 @@ const data = [ description: 'Targeting application layer support for Windows. From tooling to enablement and optimization of libraries on the Windows platform', googlegroupname: 'windows-on-arm', + slug: 'windows-on-arm', githubUrl: 'https://github.com/CoreCollective-dev/windows-on-arm-wg', }, { @@ -97,8 +98,11 @@ const data = [ data.map((item, index) => { const archiveUrl = item.archiveUrl || (item.googlegroupname ? `https://groups.google.com/u/0/a/corecollective.dev/g/${item.googlegroupname}` : null); const archiveText = item.archiveUrl ? 'Learn More' : 'List Archive'; - // The title links to the GitHub URL when provided, otherwise to the archive/group. - const titleUrl = item.githubUrl || archiveUrl; + // If the WG has a dedicated sub-page (slug), link there. Otherwise fall back to GitHub or archive. + const titleUrl = item.slug + ? `/working-groups/${item.slug}/` + : (item.githubUrl || archiveUrl); + const titleIsExternal = !item.slug; return (
  • @@ -115,7 +119,10 @@ const data = [

    {titleUrl ? ( - + {item.title} ) : ( @@ -133,7 +140,7 @@ const data = [

    {item.githubUrl && ( - Learn More + GitHub )} {archiveUrl && ( From 5efba27312326d8aee534fa5e7d57acc77fb69f5 Mon Sep 17 00:00:00 2001 From: Philip Colmer Date: Fri, 14 Aug 2026 09:31:26 +0100 Subject: [PATCH 4/4] Add new components per COR-112 --- CONTRIBUTING.md | 172 ++++++++++++++++++ src/components/WGMembers.astro | 34 ++++ src/components/WGNews.astro | 58 ++++++ src/content/config.ts | 47 +++++ src/content/wg-members/windows-on-arm.yaml | 7 + src/content/wg-news/windows-on-arm.yaml | 7 + src/content/working-groups/windows-on-arm.mdx | 8 - src/lib/companyLogos.ts | 91 +++++++++ src/lib/wgNews.ts | 34 ++++ src/pages/working-groups/[slug].astro | 20 +- 10 files changed, 469 insertions(+), 9 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 src/components/WGMembers.astro create mode 100644 src/components/WGNews.astro create mode 100644 src/content/wg-members/windows-on-arm.yaml create mode 100644 src/content/wg-news/windows-on-arm.yaml create mode 100644 src/lib/companyLogos.ts create mode 100644 src/lib/wgNews.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ea0cf3d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,172 @@ +# Contributing to the CoreCollective Website + +This guide covers the working group page components — how they work, and how to add or update content for any working group. + +## Architecture Overview + +Each working group page (`/working-groups/`) is built from three sources: + +1. **MDX content** (`src/content/working-groups/.mdx`) — the evergreen page body (projects, mailing list, resources) +2. **Members data** (`src/content/wg-members/.yaml`) — structured member list rendered as a logo grid +3. **News data** (`src/content/wg-news/.yaml`) — time-sensitive announcements shown above the page content + +The page template at `src/pages/working-groups/[slug].astro` loads all three and renders them together. Members and news are both optional — if a YAML file doesn't exist for a given slug, that section simply won't render. + +--- + +## WG News Feed (`WGNews` component) + +The news panel appears at the top of a working group page, above the evergreen MDX content. It shows the most recent announcements (up to 3 by default, sorted by date descending). + +### Adding news items + +Create or edit `src/content/wg-news/.yaml`: + +```yaml +heading: Latest News # optional, defaults to "Latest News" +items: + - headline: FFmpeg ARM64EC binaries now available + body: Prebuilt FFmpeg binaries for Windows on Arm are published for download. + date: 2026-07-01 + links: + - { label: FFmpeg ARM64EC release page, href: https://github.com/Multicorewareinc/FFmpeg/releases } + + - headline: Python 3.13 native wheels shipping + body: Pure-Python and compiled wheels now build natively on WoA CI runners. + date: 2026-06-15 +``` + +### Field constraints + +| Field | Required | Constraints | +|-------|----------|-------------| +| `headline` | Yes | 1–120 characters | +| `body` | Yes | 1–300 characters | +| `date` | Yes | Valid date (YAML date or ISO string) | +| `links` | No | Array of `{ label, href }` where `href` is a valid URL | + +The build will fail if any constraint is violated — this is intentional so broken content doesn't ship. + +### Behaviour + +- Items are sorted by date (newest first), with deterministic tie-breaking on headline +- At most 3 items are shown (configurable in code via `selectLatestNews`) +- If no news file exists or items is empty, the news section doesn't render at all +- The "More below" chevron at the bottom is a passive visual indicator (not clickable) + +--- + +## WG Members List (`WGMembers` component) + +The members section renders below the MDX content as a responsive logo grid. + +### Adding members + +Create or edit `src/content/wg-members/.yaml`: + +```yaml +heading: Working Group Members # optional +members: + - { name: Arm, logo: arm } + - { name: CIX, logo: cix } + - { name: Linaro, logo: linaro } + - { name: Microsoft, logo: microsoft } + - { name: Qualcomm, logo: qualcomm } +``` + +### Using the logo registry + +The `logo` field references a key in `src/lib/companyLogos.ts`. Available keys: + +| Key | Company | Notes | +|-----|---------|-------| +| `arm` | Arm | Scaled to 0.75 | +| `cix` | CIX | Scaled to 0.8 | +| `linaro` | Linaro | | +| `microsoft` | Microsoft | | +| `qualcomm` | Qualcomm | | + +To add a new company to the registry, add an entry to the `companyLogos` map in `src/lib/companyLogos.ts`: + +```ts +newcompany: { + src: "https://static.corecollective.dev/company_logos/newcompanyLogo.svg", + alt: "NewCompany logo", + scale: "0.9", // optional — adjusts visual size relative to peers +}, +``` + +### Inline logos (no registry) + +If a member's logo isn't in the registry, you can provide `src` and `alt` directly: + +```yaml +members: + - name: NewStartup + src: https://example.com/logo.svg + alt: NewStartup logo + scale: "0.85" # optional +``` + +When using inline `src`, the `alt` field is required (the build will fail without it). + +### Field constraints + +| Field | Required | Constraints | +|-------|----------|-------------| +| `name` | Yes | 1–200 characters | +| `logo` | No* | Must match a key in the registry | +| `src` | No* | Valid URL | +| `alt` | Only with `src` | 1–300 characters | +| `scale` | No | String like `"0.75"` — applied as CSS transform | + +*Each member must have either `logo` or `src` (or both, where inline values override the registry). + +### Behaviour + +- Members render in the order listed in YAML — this is the display order on the page +- Maximum of 50 members per working group +- If no members file exists or the array is empty, the section doesn't render +- Logos are constrained to fit uniformly with `object-contain` and responsive max dimensions + +--- + +## Working Group MDX Content + +The MDX file at `src/content/working-groups/.mdx` contains the main page body. It supports standard Markdown plus Astro components: + +```mdx +--- +title: Windows on Arm Working Group +description: Targeting application layer support for Windows. +--- + +import Note from '../../components/Note.astro'; + +## Section heading + +Content here... + + + Important callout rendered in a styled box. + +``` + +Don't put member lists in the MDX — use the YAML data file instead so they render as logos. + +--- + +## Adding a New Working Group + +1. Create `src/content/working-groups/.mdx` with `title` and `description` frontmatter +2. Optionally create `src/content/wg-members/.yaml` with the member entries +3. Optionally create `src/content/wg-news/.yaml` with news items +4. The page will be available at `/working-groups//` on next build + +The slug must match across all three files. + +--- + +## Validation + +All content files are validated at build time with Zod schemas. If something is wrong, the build will fail with a descriptive error message pointing to the offending field. Run `npm run build` locally to catch issues before pushing. diff --git a/src/components/WGMembers.astro b/src/components/WGMembers.astro new file mode 100644 index 0000000..141b097 --- /dev/null +++ b/src/components/WGMembers.astro @@ -0,0 +1,34 @@ +--- +import type { ResolvedMember } from '../lib/companyLogos'; + +interface Props { + members: ResolvedMember[]; + heading?: string; +} + +const { members, heading } = Astro.props; +--- + +{members.length > 0 && ( +

    + {heading && ( +

    + {heading} +

    + )} +
      + {members.map((member) => ( +
    • + {member.alt} +
    • + ))} +
    +
    +)} diff --git a/src/components/WGNews.astro b/src/components/WGNews.astro new file mode 100644 index 0000000..168eed8 --- /dev/null +++ b/src/components/WGNews.astro @@ -0,0 +1,58 @@ +--- +import type { NewsItem } from '../lib/wgNews'; + +interface Props { + items: NewsItem[]; + heading?: string; +} + +const { items, heading = 'Latest News' } = Astro.props; +--- + +{items.length > 0 && ( +
    +

    {heading}

    + +
    + {items.map((item) => ( +
    +

    {item.headline}

    +

    {item.body}

    + {item.links && item.links.length > 0 && ( + + )} +
    + ))} +
    + +
    + More below + +
    +
    +)} diff --git a/src/content/config.ts b/src/content/config.ts index 1c5789f..b715c2f 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -54,10 +54,57 @@ const workingGroupsCollection = defineCollection({ }), }); +const wgMemberSchema = z + .object({ + name: z.string().min(1).max(200), + logo: z.string().min(1).optional(), + src: z.string().url().optional(), + alt: z.string().min(1).max(300).optional(), + scale: z.string().optional(), + }) + .refine((m) => Boolean(m.logo) || Boolean(m.src), { + message: 'Member must provide either a `logo` key or an inline `src`.', + }) + .refine((m) => !m.src || Boolean(m.alt), { + message: 'Inline `src` requires `alt` text.', + }); + +const wgMembersCollection = defineCollection({ + type: 'data', + schema: z.object({ + heading: z.string().optional(), + members: z.array(wgMemberSchema).max(50), + }), +}); + +const wgNewsItemSchema = z.object({ + headline: z.string().min(1).max(120), + body: z.string().min(1).max(300), + date: z.coerce.date(), + links: z + .array( + z.object({ + label: z.string().min(1), + href: z.string().url(), + }) + ) + .optional(), +}); + +const wgNewsCollection = defineCollection({ + type: 'data', + schema: z.object({ + heading: z.string().optional(), + items: z.array(wgNewsItemSchema), + }), +}); + export const collections = { blogs, logos: logosCollection, leadership: leadershipCollection, faq: faqCollection, 'working-groups': workingGroupsCollection, + 'wg-members': wgMembersCollection, + 'wg-news': wgNewsCollection, }; diff --git a/src/content/wg-members/windows-on-arm.yaml b/src/content/wg-members/windows-on-arm.yaml new file mode 100644 index 0000000..b5b0b2c --- /dev/null +++ b/src/content/wg-members/windows-on-arm.yaml @@ -0,0 +1,7 @@ +heading: Working Group Members +members: + - { name: Arm, logo: arm } + - { name: CIX, logo: cix } + - { name: Linaro, logo: linaro } + - { name: Microsoft, logo: microsoft } + - { name: Qualcomm, logo: qualcomm } diff --git a/src/content/wg-news/windows-on-arm.yaml b/src/content/wg-news/windows-on-arm.yaml new file mode 100644 index 0000000..436a80d --- /dev/null +++ b/src/content/wg-news/windows-on-arm.yaml @@ -0,0 +1,7 @@ +heading: Latest News +items: + - headline: FFmpeg ARM64EC binaries now available + body: Prebuilt FFmpeg binaries for Windows on Arm are published for download. + date: 2026-07-01 + links: + - { label: FFmpeg ARM64EC release page, href: https://github.com/Multicorewareinc/FFmpeg/releases } diff --git a/src/content/working-groups/windows-on-arm.mdx b/src/content/working-groups/windows-on-arm.mdx index 553f0ec..1f82333 100644 --- a/src/content/working-groups/windows-on-arm.mdx +++ b/src/content/working-groups/windows-on-arm.mdx @@ -43,14 +43,6 @@ If you are looking for status or build instructions for Windows on Arm on a spec [here is a list](https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28682879341/Detailed+How-To+and+Status+sub+pages) of the historic status and work carried out up to end of 2025. -## WG Members - -- Arm -- CIX -- Linaro -- Microsoft -- Qualcomm - ## Resources - [GitHub Repository](https://github.com/CoreCollective-dev/windows-on-arm-wg) diff --git a/src/lib/companyLogos.ts b/src/lib/companyLogos.ts new file mode 100644 index 0000000..6464575 --- /dev/null +++ b/src/lib/companyLogos.ts @@ -0,0 +1,91 @@ +export interface CompanyLogo { + src: string; + alt: string; + scale?: string; +} + +/** + * Keyed registry of company logos reused across the site. + * URLs reference assets on static.corecollective.dev. + */ +export const companyLogos: Record = { + arm: { + src: "https://static.corecollective.dev/company_logos/armLogo.svg", + alt: "Arm logo", + scale: "0.75", + }, + cix: { + src: "https://static.corecollective.dev/company_logos/cixLogo.svg", + alt: "CIX logo", + scale: "0.8", + }, + linaro: { + src: "https://static.corecollective.dev/company_logos/linaroLogo.svg", + alt: "Linaro logo", + }, + microsoft: { + src: "https://static.corecollective.dev/company_logos/microsoftLogo.svg", + alt: "Microsoft logo", + }, + qualcomm: { + src: "https://static.corecollective.dev/company_logos/qualcommLogo.svg", + alt: "Qualcomm logo", + }, +}; + +export interface ResolvedMember { + name: string; + src: string; + alt: string; + scale?: string; +} + +export interface RawMember { + name: string; + logo?: string; + src?: string; + alt?: string; + scale?: string; +} + +/** + * Resolve raw member entries against the logo registry, preserving order. + * Throws on an unresolved `logo` key so the build fails (Req 2.5). + * + * Resolution rules: + * - If `logo` is set, look it up in the registry. If the key is missing, throw. + * Inline `src`/`alt`/`scale` override matching registry fields when both are present. + * - If only `src`/`alt` are set (no `logo` key), use them directly. + * - Empty input returns an empty array without error. + */ +export function resolveMembers( + entries: RawMember[], + registry: Record = companyLogos, +): ResolvedMember[] { + return entries.map((entry) => { + if (entry.logo) { + const registryEntry = registry[entry.logo]; + if (!registryEntry) { + throw new Error( + `Unresolved logo key "${entry.logo}" for member "${entry.name}". ` + + `Available keys: ${Object.keys(registry).join(", ")}`, + ); + } + + return { + name: entry.name, + src: entry.src ?? registryEntry.src, + alt: entry.alt ?? registryEntry.alt, + scale: entry.scale ?? registryEntry.scale, + }; + } + + // Inline-only entry (no registry reference) + return { + name: entry.name, + src: entry.src!, + alt: entry.alt!, + scale: entry.scale, + }; + }); +} diff --git a/src/lib/wgNews.ts b/src/lib/wgNews.ts new file mode 100644 index 0000000..bad5cd5 --- /dev/null +++ b/src/lib/wgNews.ts @@ -0,0 +1,34 @@ +export interface NewsItem { + headline: string; + body: string; + date: Date; + links?: { label: string; href: string }[]; +} + +/** + * Sort by date descending, break ties deterministically by headline, + * then take at most `max` items. + * + * Does not mutate the input array. + */ +export function selectLatestNews(items: NewsItem[], max = 3): NewsItem[] { + const clampedMax = Math.max(1, max); + + // Attach original index for stable tie-breaking + const indexed = items.map((item, i) => ({ item, i })); + + indexed.sort((a, b) => { + // Primary: date descending + const dateCompare = b.item.date.getTime() - a.item.date.getTime(); + if (dateCompare !== 0) return dateCompare; + + // Secondary: headline ascending (lexicographic) + const headlineCompare = a.item.headline.localeCompare(b.item.headline); + if (headlineCompare !== 0) return headlineCompare; + + // Tertiary: original index ascending (stable) + return a.i - b.i; + }); + + return indexed.slice(0, clampedMax).map(({ item }) => item); +} diff --git a/src/pages/working-groups/[slug].astro b/src/pages/working-groups/[slug].astro index 64bac84..fad815b 100644 --- a/src/pages/working-groups/[slug].astro +++ b/src/pages/working-groups/[slug].astro @@ -1,7 +1,11 @@ --- -import { getCollection } from 'astro:content'; +import { getCollection, getEntry } from 'astro:content'; import BaseLayout from '../../layouts/BaseLayout.astro'; import Contact from '../../components/Contact.astro'; +import WGMembers from '../../components/WGMembers.astro'; +import WGNews from '../../components/WGNews.astro'; +import { resolveMembers } from '../../lib/companyLogos'; +import { selectLatestNews } from '../../lib/wgNews'; import backgroundImage from '../../assets/ccbgd3.png'; export async function getStaticPaths() { @@ -14,6 +18,12 @@ export async function getStaticPaths() { const { entry } = Astro.props; const { Content } = await entry.render(); + +const news = await getEntry('wg-news', entry.slug); +const latest = news ? selectLatestNews(news.data.items, 3) : []; + +const membersEntry = await getEntry('wg-members', entry.slug); +const members = membersEntry ? resolveMembers(membersEntry.data.members) : []; --- @@ -71,11 +81,19 @@ const { Content } = await entry.render();

    + {latest.length > 0 && ( + + )} +
    + + {members.length > 0 && ( + + )}