Git Product home page Git Product logo

sanity-template-remix-clean's Introduction

A minimal Remix site with Sanity Studio

This starter uses Remix for the front end 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.

This is not a monorepo setup. We put them both in one repository for the sake of simplicity. You might want to have separate repositories for each of the folders, to make it easier to deploy the app and the studio separately.

Prerequisities

Getting started

Run the following commands to prepare both applications:

  1. From the root of the repository, install dependencies
pnpm install
  1. Select or create a Sanity project and dataset, and output the details to a .env.local file
cd studio && pnpm sanity init --env .env.local
  1. From the root directory, copy environment variables from the Studio folder to the Remix folder
cp ./studio/.env.local ./app/.env
  1. Start the development servers:
pnpm dev

Feel free to move each of the folders to their own location and check them into version control.

Enable Visual Editing in the Remix app

Update the .env file in the /app directory to enable "stega", which is required for Presentation.

# ./app/.env
SANITY_STUDIO_STEGA_ENABLED="true"

Add content in the Studio

  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 SANITY_STUDIO_URL that points to the Studio's deployment URL.

sanity-template-remix-clean's People

Contributors

benja avatar ecospark[bot] avatar rdunk avatar renovate[bot] avatar simeongriggs avatar stipsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sanity-template-remix-clean's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Using a curated preset maintained by


Sanity: The Composable Content Cloud

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): update dependency @sanity/react-loader to v1.9.4
  • chore(deps): lock file maintenance
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Detected dependencies

github-actions
.github/workflows/prettier.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • tibdex/github-app-token v2@3beb63f4bd073e61482598c45c71c1019b59b73a
  • peter-evans/create-pull-request v6@70a41aba780001da0a30141984ae2a0c95d8704e
npm
app/package.json
  • @portabletext/react 3.0.13
  • @remix-run/node 2.8.1
  • @remix-run/react 2.8.1
  • @remix-run/serve 2.8.1
  • @sanity/client 6.15.5
  • @sanity/image-url 1.0.2
  • @sanity/react-loader 1.9.3
  • @sanity/visual-editing 1.8.2
  • groq 3.34.0
  • isbot 5.1.2
  • react 18.2.0
  • react-dom 18.2.0
  • @portabletext/types 2.0.10
  • @remix-run/dev 2.8.1
  • @remix-run/eslint-config 2.8.1
  • @sanity/types 3.34.0
  • @types/react 18.2.67
  • @types/react-dom 18.2.22
  • autoprefixer 10.4.18
  • eslint 8.57.0
  • postcss 8.4.36
  • postcss-cli 11.0.0
  • typescript 5.4.2
  • node >= 14.18
package.json
  • prettier 3.2.5
  • prettier-plugin-packagejson 2.4.12
  • pnpm 8.15.5
studio/package.json
  • @sanity/vision 3.34.0
  • react 18.2.0
  • react-dom 18.2.0
  • rxjs 7.8.1
  • sanity 3.34.0
  • styled-components 6.1.8
  • @sanity/eslint-config-studio 3.0.1
  • @types/react 18.2.67
  • eslint 8.57.0
  • prettier 3.2.5
  • typescript 5.4.2
  • node >= 14.18

  • Check this box to trigger a request for Renovate to run again on this repository

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.