Introducing GROQ-powered Webhooks
June 23, 2020

How to make a starter for sanity.io/create

Official(made by Sanity team)

How to make a starter for sanity.io/create

Sanity.io/create is a service that lets you initiate and deploy a Sanity.io powered application in minutes. It integrates with GitHub and hosting services like Netlify and Vercel. You can deploy any starter that has a public GitHub repository and follows the specification. This guide outlines how you can create your own starter template for sanity.io/create.

Template structure

sanity-template.json

This is the manifest file where you put the metadata for your starter. Go to the manifest section to learn more about it

/template

This is the folder where you set up the code that will end up on the root level of those who deploys your starter through sanity.io/create. Many starters have a monorepo setup where you find a `web` and `studio` folder, with some monorepo tooling in the root (like Lerna).

/data

You can add a dataset export (for example, `production.tar.gz`) to this folder if you want to add example content to the starter.

/assets

If you have defined illustrations/images in sanity-template.json, this is the folder to put those files.

package.json

This is where the dependencies for the starter development is added to. In most cases, this will be the `sanity-template` package, and git hook managers like husky. It can also contain a bunch of useful npm scripts useful for local starter development.


[example]


Starter manifest


Tooling

If you plan to make your own starter, you most probably want to use the `sanity-template` tooling that we have made to make local starter template development easier. It will let you watch the changes in the template folder and build it automatically, useful if you use string templates and the like. You can use package as a CLI, but we recommend adding it as a dependency in the starter templates’ root, and running it via npm scripts.

Adding example content


Deployment


Ref deployment