---
import { getCollection, render } from 'astro:content';
import Docs from '../layouts/Docs.astro';

// Rendered from docs/CONTRIBUTING.md (the single source) — there's one entry.
const [entry] = await getCollection('contributing');
if (!entry) {
  throw new Error(
    'contributing.astro: the "contributing" collection is empty — is docs/CONTRIBUTING.md present and matched by the glob loader in content.config.ts?'
  );
}
const { Content, headings } = await render(entry);
---

<Docs
  title="Contributing — pixtuoid"
  description="Contribute to pixtuoid: build & test workflow, conventions, the review process, and how to add a new agent CLI."
  headings={headings}
  current="contributing"
  sourcePath="docs/CONTRIBUTING.md"
>
  <Content />
</Docs>
