I have a collection schema in config.ts for a collection pages like this: const pageSchema = defineCollection({ schema: ({ image }) => z.strictObject({ title: z.string(), description: z.string(), authors: z.array(z.string()), }), });
This validates page frontmatter in the pages collection.
I also have a page /src/pages/foo.astro that passes an object frontmatter to the layout.
Can I reuse pageSchema to validate the frontmatter object in foo.astro?