-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Currently, if a theme uses a Content Collection, the theme user has to either clone a template with the Content Collection or manually set it up inside their own project. It would be nice if themes had the ability to automatically inject Content Collections into a project. This could be accomplished using a library like ts-morph
to read the content/config.ts
file and inject a schema into the collections
object
Goals:
- Automatically generate and seed content collections
- Automatically inject collection schemas into user's projects
Things to consider:
- AIK uses
recast
for codegen, should this be done usingts-morph
orrecast
? - Should this be a separate package, so others can use it too?
- Should the codegen happen directly on the file or inside a Vite plugin behind the scenes, meaning a user will not be able to see the schema inside the config file?
Working prototype using ts-morph
: https://github.com/BryceRussell/prototype-inject-collection
altsalt
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Type
Projects
Status
In Progress