Code Monkey home page Code Monkey logo

sanity-visual-editing-demo's Introduction

Vercel Visual Editing Demo

Note

Vercel Visual Editing is an opt-in feature for Enterprise customers of both Sanity and Vercel. If you are an existing enterprise customer, contact our sales team to have Visual Editing enabled on your project. Learn more about Sanity for Enterprise organizations here.

This starter is preconfigured to support Visual Editing, a new feature that enables you to make changes using Vercel's draft mode and new edit functionality. It is a statically generated personal website that uses Next.js for the frontend and Sanity to handle its content.

It comes with a native Sanity Studio that offers features like real-time collaboration, instant side-by-side content previews, and intuitive editing.

The Studio connects to Sanity Content Lake, which gives you hosted content APIs with a flexible query language, on-demand image transformations, powerful patching, and more.

You can use this starter to kick-start a personal website to learn more about Visual Editing or other awesome Sanity features.

Deploy with Vercel

Features

  • A performant, static personal personal website with editable projects
  • A native and customizable authoring environment, accessible on yourpersonalwebsite.com/studio
  • Real-time and collaborative content editing with fine-grained revision history
  • Support for block content and the most advanced custom fields capability in the industry
  • Free Sanity project with unlimited admin users, free content updates, and pay-as-you-go for API overages
  • A project with starter-friendly and not too heavy-handed TypeScript and Tailwind.css

Table of Contents

Project Overview

Personal Website Studio
Personal Website Sanity Studio

Important files and folders

File(s) Description
sanity.config.ts Config file for Sanity Studio
sanity.cli.ts Config file for Sanity CLI
/pages/studio/[[...index]]/page.tsx Where Sanity Studio is mounted
/schemas Where Sanity Studio gets its content types from
/plugins Where the advanced Sanity Studio customization is setup
/lib/sanity.api.ts,/lib/sanity.image.ts Configuration for the Sanity Content Lake client

Configuration

Step 1. Set up the environment

Use the Deploy Button below. It will let you deploy the starter using Vercel as well as connect it to your Sanity Content Lake using the Sanity Vercel Integration.

Deploy with Vercel

Step 2. Set up the project locally

Clone the repository that was created for you on your GitHub account. Once cloned, run the following command from the project's root directory:

npx vercel link

Download the environment variables needed to connect Next.js and the Studio to your Sanity project:

npx vercel env pull

Step 3. Run Next.js locally in development mode

npm install && npm run dev

When you run this development server, the changes you make in your frontend and studio configuration will be applied live using hot reloading.

Your personal website should be up and running on http://localhost:3000! You can create and edit content on http://localhost:3000/studio.

Step 4. Deploy to production

To deploy your changes to production you use git:

git add .
git commit
git push

Alternatively, you can deploy without a git hosting provider using the Vercel CLI:

npx vercel --prod

Questions and Answers

How do I enable Visual Editing on my own Vercel project?

Read our guide.

It doesn't work! Where can I get help?

In case of any issues or questions, you can post:

How can I remove the "Next steps" block from my personal website?

You can remove it by deleting the IntroTemplate component in /components/shared/Layout.tsx and the /intro-template directory.

Next steps

sanity-visual-editing-demo's People

Contributors

x-oss-byte avatar

Watchers

 avatar

Forkers

renovate-bot

sanity-visual-editing-demo'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): lock file maintenance

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update non-major (@sanity/vision, @vercel/og, eslint, postcss, prettier, prettier-plugin-tailwindcss, sanity, typescript)
  • chore(deps): update dependency styled-components to v6

Detected dependencies

npm
package.json
  • @portabletext/react 3.0.7
  • @sanity/client 6.4.9
  • @sanity/demo 1.0.2
  • @sanity/image-url 1.0.2
  • @sanity/vision 3.15.1
  • @tailwindcss/typography 0.5.9
  • @vercel/og 0.5.11
  • classnames 2.3.2
  • date-fns 2.30.0
  • get-youtube-id 1.0.1
  • intl-segmenter-polyfill 0.4.4
  • next 13.4.19
  • next-google-fonts 2.2.0
  • next-sanity 5.4.6
  • react 18.2.0
  • react-dom 18.2.0
  • react-is 18.2.0
  • react-lite-youtube-embed 2.3.52
  • sanity 3.15.1
  • sanity-plugin-asset-source-unsplash 1.1.0
  • styled-components 5.3.11
  • @types/react 18.2.21
  • autoprefixer 10.4.15
  • eslint 8.47.0
  • eslint-config-next 13.4.19
  • eslint-plugin-simple-import-sort 10.0.0
  • postcss 8.4.28
  • prettier 3.0.2
  • prettier-plugin-packagejson 2.4.5
  • prettier-plugin-tailwindcss 0.5.3
  • tailwindcss 3.3.3
  • typescript 5.1.6

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

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/demo to v2
  • chore(deps): update dependency eslint-plugin-simple-import-sort to v12
  • chore(deps): update dependency next to v14
  • chore(deps): update dependency next-sanity to v6
  • chore(deps): update dependency next-sanity to v7
  • chore(deps): update dependency next-sanity to v8
  • chore(deps): update dependency next-sanity to v9
  • chore(deps): update dependency sanity-plugin-asset-source-unsplash to v2
  • chore(deps): update dependency sanity-plugin-asset-source-unsplash to v3
  • chore(deps): lock file maintenance
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @portabletext/react 3.0.7
  • @sanity/client 6.4.9
  • @sanity/demo 1.0.2
  • @sanity/image-url 1.0.2
  • @sanity/vision 3.15.1
  • @tailwindcss/typography 0.5.9
  • @vercel/og 0.5.11
  • classnames 2.3.2
  • date-fns 2.30.0
  • get-youtube-id 1.0.1
  • intl-segmenter-polyfill 0.4.4
  • next 13.4.19
  • next-google-fonts 2.2.0
  • next-sanity 5.4.6
  • react 18.2.0
  • react-dom 18.2.0
  • react-is 18.2.0
  • react-lite-youtube-embed 2.3.52
  • sanity 3.15.1
  • sanity-plugin-asset-source-unsplash 1.1.0
  • styled-components 5.3.11
  • @types/react 18.2.21
  • autoprefixer 10.4.15
  • eslint 8.47.0
  • eslint-config-next 13.4.19
  • eslint-plugin-simple-import-sort 10.0.0
  • postcss 8.4.28
  • prettier 3.0.2
  • prettier-plugin-packagejson 2.4.5
  • prettier-plugin-tailwindcss 0.5.3
  • tailwindcss 3.3.3
  • typescript 5.1.6

  • 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.