Welcome to the GitHub repository for the Sørensen og Balchen corporate website. This project leverages the power of SvelteKit for a dynamic frontend experience and Sanity.io for streamlined content management.
Important
This repository is organized into two main folders:
/app
and/studio
. The/app
folder houses the frontend code (SvelteKit), while the/studio
folder contains the Sanity Studio code for content management.Despite being housed in a single repository for ease of access, this is not a monorepo setup. You may consider separating these folders into individual repositories for independent deployment of the app and the studio components.
Follow these steps in both the /app
and /studio
directories to set up your development environment:
npm install
to install the necessary dependencies.npx -y sanity@latest init --env
, during this process:.env
file will be generated with the necessary environment variables.sanity init --env
if you have the CLI installed./app
folder to include the PUBLIC_
prefix: PUBLIC_SANITY_DATASET
and PUBLIC_SANITY_PROJECT_ID
.npm run dev
.You can now access your SvelteKit app at http://localhost:5173/ and the Sanity Studio at http://localhost:3333/.
Feel free to relocate each of the folders and manage them in separate version control systems if preferred.
Post
document.You can customize the schema for the Post
document within the /studio/schemas
folder. Add more documents and schemas to extend the functionality as per your requirements.
If TypeScript is not required for your project, follow these steps:
npm install
in the repository root to install dependencies.node remove-typescript.mjs
to remove TypeScript configurations and types from both the /app
and /studio
directories.Following this, you can delete any files in the repository root, excluding the /studio
and /app
folders, if you don't plan on using TypeScript.
The /app
and /studio
directories are designed to be deployed separately. Here are some guidelines:
sanity deploy
within the /studio
directory (requires @sanity/cli
to be installed globally).I hope this meets your project's needs! If you have any further customization requests, feel free to ask.