Is it possible to create my own Starter?

Hello Community,

I'm developing an ecommerce website using Next.js.
I have a question regarding this.

I know that I can create a project based on a "template" that already has predefined custom types and some default documents.
I would love to do the same with my project, meaning that it could serve as a template for other potential clients, allowing me to have pre-filled documents and expedite part of the configuration for each repository.

Could you assist me with this? How can I achieve it?
I hope I've made myself clear as my English isn't very strong.

Best regards, thank you very much, and have a great day.

Hello @vfestiven ,

I'll be happy to help you with this.

To create a sort of template, you can use the theme command from the Prismic CLI. (Although this will not add any default documents.)

You will be able to add you custom types and connect the new repo to your project:

Make sure to have:

  • A prismic-configuration.js file.
    • This file should include the project’s client configuration, with the API endpoint set to 'https://your-repo-name.cdn.prismic.io/api/v2' .
  • A public github repo.
  • A custom_types folder in your project

You'll then be able to initialise a new project with this theme command:
prismic theme --theme-url https://github.com/prismicio/gatsby-js-sample

Let me know if you have any questions.

Thanks.

Hello Phil, how are you doing?

I've gone through the documentation, but I would specifically like to know if there is a method to build the structure of each file located in the "documents" folder, similar to the following starter: https://github.com/prismicio-community/nextjs-starter-prismic-blog/tree/master/documents

I would like to be able to generate a file like these:


1. https://github.com/prismicio-community/nextjs-starter-prismic-blog/blob/master/documents/index.json

  1. https://github.com/prismicio-community/nextjs-starter-prismic-blog/blob/960e77817852cf489b782016969b34fd073fa59c/documents/en-us/YlXu8hMAACQAHeLK%3D%23%3DZL42QRIAACMA6Rqb%3D%23%3Dpage%3D%23%3DYlXu8hMAACQAHeLM%3D%23%3Den-us%3D%23%3Dy.json

Is it possible to achieve this? Thank you. Regards

I'm doing good Estiven, how are you?

Unfortunately, sending documents as part of a theme isn't something that's available at the minute.