darenmalfait / dz-opstellingen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DZ Opstellingen

Sanity tool to simplify the creation of badminton match setups for local competition..


β˜• Setup

Install node_modules with npm install.

Sanity

If you don't have the Sanity CLI installed, install it globally using npm install -g @sanity/cli.

  1. sanity init
  2. During Sanity's initalization it will warn you, type Y and hit enter:
    ? The current folder contains a configured Sanity studio. Would you like to reconfigure it? (Y/n)
    
  3. When it asks you what dataset configuration to use, go with production.
  4. 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

⚠️ 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 at studio/parts/resolve-actions

Config

  1. Run cp .env.example .env.development file in the project folder.
  2. Update all the xxxxxx values, here's where to find each:
  • SANITY_STUDIO_API_PROJECT_ID - You can grab this from your Sanity Manage dashboard
  • SANITY_STUDIO_API_DATASET - Chose this on init

πŸš€ Deployment

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.

About


Languages

Language:TypeScript 55.0%Language:JavaScript 34.2%Language:CSS 10.2%Language:Shell 0.7%