Skip to content

Runtime config / schema validationย #214

Open
@schickling

Description

@schickling

Some users (typically users who don't yet use TypeScript) are running into problems due to misconfigurations of their Contentlayer config (especially in regards to the content schema). Additionally to the safety provided by TypeScript, we should also implement a runtime validation step to avoid undefined runtime errors.

Technical notes

Ideally we should figure out a way how to derive Zod-like validation logic based on the existing TypeScript definitions. We could also investigate to use TS+ for this.

Related issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions