Pre-defined Zod Schema to enable Theme Interoperability #959
emeraldjava
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Summary
In order to allow for easier switching of astro themes I want my content markdown files to follow a pre-defined zod schema so required and optional fields are know in advance. The astro platform would provide a set of base template zod schema configurations from which the user can select. Theme developers can code towards the same zod schema.
Background & Motivation
Allow easier switching between astro themes. At the moment it seems each astro theme declares it's own zod format. With these templates in place, it would mean we can create migration tools from format X to a specific astro zod format. Coming from hugo - theme switching was simpler.
Goals
A concise, bulleted-list outlining the intended goals of this RFC.
Example A
via https://github.com/nikolovlazar/egghead-personal-blog-astro/blob/lesson-8/src/content/config.ts
Example B
via https://github.com/learnwithjason/astro-content-collections/blob/main/src/content/config.ts
References
Beta Was this translation helpful? Give feedback.
All reactions