Sanity
Introduction
Getting started
Installation
npm install @shopstory/sanityAdd Shopstory plugin
import { defineConfig } from "sanity";
import { shopstory } from "@shopstory/sanity";
import { mediaAssetSource } from "sanity-plugin-media";
const SITE_URL = "http://localhost:3000" // root URL of your site
export default defineConfig({
// ...
plugins: [
// ...
shopstory({
accessToken: "your-shopstory-access-token",
canvasUrl: `${SITE_URL}/shopstory-canvas`,
locales: [
{
code: "en",
isDefault: true,
},
{
code: "de",
fallback: "en",
},
],
assetSource: mediaAssetSource,
}),
],
});Add Shopstory field to your schema
Add Sanity plugin to the Shopstory config
Let's build some content
Displaying content
Further reading
Last updated