Sanity CMS
The CMS panel in the left rail connects your site to a Sanity project. Once connected, Sanity Studio runs inside your dev server so you can author structured content — blog posts, product pages, settings, anything with a schema — while building the site visually.
You need a free Sanity account. You don’t need a Sanity project yet: Plyed can create one for you.
Connect
Section titled “Connect”- Open the CMS panel in the left rail and choose Sanity.
- Click Connect Sanity.
- If this Mac doesn’t have the Sanity CLI yet, Plyed installs its own copy (about 350 MB, kept in Plyed’s own folder). Clicking Connect Sanity is what allows it; nothing installs before that.
- If you aren’t signed in to Sanity, a small window opens: pick how you sign in (GitHub, Google, email…) and finish in the browser. The window closes on its own.
- Plyed lists your Sanity projects. Pick one, or choose Create a new project: it is named after your site (change the name if you like) and created on Sanity’s free plan. If you belong to several Sanity organizations, pick the one it goes in; if you have none, Plyed creates one for you first.
- Keep the dataset as
productionor type another name, then click Connect this project (or Create and connect).
The panel then works through the rest on its own, showing each step as it goes:
- creates the dataset if the project doesn’t have it yet (a public one, so your site can read its content),
- installs Sanity Studio into your project (this can take a minute) and saves
the project ID and dataset to your project’s
.env, - restarts the dev server with a Studio route at
/admin, - lets Studio sign you in from Plyed’s preview (see below),
- deploys your schema.
If a step fails, the panel says why, right under that step. Try again carries on from that step: anything already done, such as a project already created, is not done twice. Cancel stops the setup at any point; Continue setup picks it up again.
Already have a project ID?
Section titled “Already have a project ID?”Click Enter a project ID instead under the button. Paste the Project
ID from sanity.io/manage (the full manage
URL works too), set the Dataset if it isn’t production, and click
Connect Sanity. Plyed runs the same steps for that project.
When the setup finishes the button label changes to Save — use it any time you want to point the project at a different Sanity project or dataset.
Manage content
Section titled “Manage content”Click Open Studio ↗ to open Sanity Studio in your browser. Studio is served by the running dev server, so the button is disabled when the dev server is stopped — start it first from the Code window’s bottom bar.
Inside Studio you can create and edit documents, upload media, and manage anything your schemas define. Saving a draft and publishing a document are separate actions. Plyed’s published static sites show content from their last build: publish the document in Sanity, then rebuild and republish the site to show the update. A preview branch does not create a separate Sanity dataset or an automatically updating draft preview.
Give a client access
Section titled “Give a client access”Invite the client to your Sanity project separately from their Plyed portal invitation. Open Studio ↗ in the desktop opens your local dev server; another person needs a hosted Studio to work while your computer is offline. The current CMS panel does not offer the complete hosted Studio deployment and portal-link setup. If a hosted Studio is already connected in the portal, the client can use Edit content → Open Studio with their Sanity account.
If Studio can’t sign you in
Section titled “If Studio can’t sign you in”Sanity only accepts sign-ins from browser addresses (origins) that are on
your project’s allowlist. Plyed serves projects on its own ports
(localhost:5551–5559, plus 5599 for a standalone Studio) so it never
collides with other tools on your machine — but a fresh Sanity project
doesn’t know those ports yet.
Plyed registers them for you as part of Connect Sanity, using your
Sanity sign-in. If that step fails, the panel shows the reason with Try
again. You can also allow the ports manually: open
sanity.io/manage, pick your project, go to API → CORS origins, and add
http://localhost:5551 through http://localhost:5559 and
http://localhost:5599, each with Allow credentials checked.
Deploy schema
Section titled “Deploy schema”Deploy schema pushes your local schema definitions to Sanity so Studio’s content tooling knows your document types. Connect Sanity already does it once; click Deploy schema again after you change your schemas.
Click Deploy schema. If you’re not already signed in to Sanity, Plyed opens the Sanity login in a small window:
- Pick how you sign in to Sanity (GitHub, Google, email…) in that window.
- Finish the sign-in in the browser that opens.
- The window closes on its own and Plyed deploys the schema.
The login needs the Sanity CLI. If it isn’t on your Mac, the panel shows Install Sanity CLI and log in: one click installs Plyed’s own copy (about 350 MB) and then opens the login. You can also install it, or log in ahead of time, from Account → Connect accounts.
Once signed in, the schema deploys and the panel shows how many types were pushed.
Use content in pages
Section titled “Use content in pages”Your project ships with src/lib/sanity.ts — a pre-configured Sanity client
that connects to your project using the credentials in .env. Fetch content
with GROQ in any Astro page or component:
import { sanity } from "../lib/sanity";
const pages = await sanity.fetch(`*[_type == "page"]{title, slug}`);You can copy this snippet from the CMS panel with the Copy button next to the “Use content in a page” preview.
Ask AI Chat to write GROQ queries, scaffold schema types, or wire content into your pages. There is no separate CMS mode to select — see AI editing for how to use chat.
Disconnect
Section titled “Disconnect”Click Disconnect at the bottom of the panel. Plyed removes the Sanity
keys from .env and restarts the dev server. The scaffolded files — schemas,
sanity.config.ts, and src/lib/sanity.ts — are kept in your project for
reference.