"custom_types" by existing prismic repository

Hi,

I've started a new project by following Page Not Found - Prismic.
The key difference is that I already have a content structure in prismic.
Is there any way to generate the "custom_types" .json files by the existing data structures in prismic repository?

Cheers,
Chris

Hi Christian,

Can you please clarify what you mean by " I already have a content structure in prismic.".

Do you mean that you already have documents but not custom types? have you deleted your custom type JSON

To have more info, can you provide your repository name (in a private message if possible.)

Looking forward to your reply,
Fares

Hi @Fares,

first thank you for your response.
I created a new project but having already a repository in prismic that I want to use in the new project.

I guess I found the solution already: I just have to copy the "json" in prismic backend of the custom types and persist them as files in ./custom_types as .json files and it's working out of the box.

Did I do this properly?

And again, thank you.

Cheers,

This is quite outrages, why do i need to copy this stuff Manually, this can't be a prope way, common guys, its ridiculous. Sounds like hacky temporarelly solution.

It is a hacky temporary solution until they implement the custom type builder locally

1 Like

Hi @paperfoods, and welcome to the Prismic community.

As @kris said, we are working on improving this workflow in the SliceMachine project (still in Beta).

In fact, in a Slice Machine project, you build your custom type locally you save it to your versioning system (such as Git), where you will be able to push it to any repository using the new Custom type API.

This issue has been closed due to inactivity. Flag to reopen.