👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect
Last updated 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


Sanity – build remarkable experiences at scale

Sanity Composable Content Cloud is the headless CMS that gives you (and your team) a content backend to drive websites and applications with modern tooling. It offers a real-time editing environment for content creators that’s easy to configure but designed to be customized with JavaScript and React when needed. With the hosted document store, you query content freely and easily integrate with any framework or data source to distribute and enrich content.

Sanity scales from weekend projects to enterprise needs and is used by companies like Puma, AT&T, Burger King, Tata, and Figma.