Sanity tool to simplify the creation of badminton match setups for local competition..
Install node_modules with npm install
.
If you don't have the Sanity CLI installed, install it globally using npm install -g @sanity/cli
.
sanity init
- During Sanity's initalization it will warn you, type
Y
and hitenter
:? The current folder contains a configured Sanity studio. Would you like to reconfigure it? (Y/n)
- When it asks you what dataset configuration to use, go with
production
. - Add CORS Origins to your newly created Sanity project (visit: manage.sanity.io and go to Settings > API):
- Add your Studio URLs with credentials:
http://localhost:3333
and[subdomain].sanity.studio
- Add your Studio URLs with credentials:
⚠️ Important!
For "singleton" documents, like settings sections, the schema uses__experimental_actions
. You will need to comment out the__experimental_actions
line in "singleton" schemas to publish settings for the first time. This is because a singleton is still a document type, and one needs to exist first before it can be edited. If you create a new singleton document. You need to add it to the list of singletons atstudio/parts/resolve-actions
- Run
cp .env.example .env.development
file in the project folder. - Update all the
xxxxxx
values, here's where to find each:
SANITY_STUDIO_API_PROJECT_ID
- You can grab this from your Sanity Manage dashboardSANITY_STUDIO_API_DATASET
- Chose this on init
You can simply run npm run deploy
from the project folder. Select a subdomain you want; your Studio is now accessible from the web.
⚠️ Important!
Deploy takes.env.production
so make sure it exists.