Coder Social home page Coder Social logo

alternateerror's Introduction

A minimal SvelteKit site with Sanity Studio

This starter uses SvelteKit for the frontend and Sanity to handle its content.

Featuring

Note

This starter features an /app and a /studio folder. The /app folder contains the frontend code, and the /studio folder contains the Sanity Studio code.

It is configured as a monorepo using pnpm workspaces, but you can treat these directories as separate projects if you prefer.

Prerequisities

Getting started

Run the following commands to prepare both applications, each step should be executed from the root directory:

  1. Install dependencies.
pnpm install
  1. Select or create a Sanity project and dataset, and output the details to a .env file.
cd studio && pnpm sanity init --env .env
  1. Generate a token with read permissions for use in the next step.
pnpm sanity manage
  1. Copy the example app .env file and populate it with the required values.
cp ./app/.env.example ./app/.env
  1. Start the development servers:
pnpm dev

Add content

  1. Visit the Studio and create and publish a new Post document
  2. Visit the App and refresh the page to see your content rendered on the page

The schema for the Post document is defined in the /studio/schemas folder. You can add more documents and schemas to the Studio to suit your needs.

Deployments

The /app and /studio folders are meant to be deployed separately.

Make sure that after /app is deployed the .env file in /studio is updated with its deployment URL under SANITY_STUDIO_PREVIEW_URL.

And /app has a .env file with PUBLIC_SANITY_STUDIO_URL that points to the Studio's deployment URL.

alternateerror's People

Contributors

n3-rd avatar renovate[bot] avatar benja avatar stipsan avatar ehowey avatar rdunk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.