0.2.7 • Published 4 years ago
rs-sanity-schema v0.2.7
Redstitch Sanity Schema Bro!
npm i rs-sanity-schema
To be used with:
You should really consider creating a env.js
file in the root of your project, or you're not going to have a good time:
export const appName = 'NAME';
export const netlifyAppId = 'NETLIFYAPPID';
export const netlifyBuildHook = 'NETLIFYBUILDHOOK';
const remoteURL = 'https://REMOTE.netlify.com'
const localURL = 'http://localhost:8000';
const appUrl = window.location.hostname === 'localhost' ? localURL : remoteURL;
export const previewUrl = `${appUrl}/preview`;
You will also TOTALLY need this change your sanity.json file to some that goes a little bit... like this:
{
"root": true,
"project": {
"name": "test"
},
"api": {
"projectId": "hazo3ur7",
"dataset": "production"
},
"plugins": [
"@sanity/base",
"@sanity/components",
"@sanity/default-layout",
"@sanity/default-login",
"@sanity/desk-tool",
"studio-logo",
"@sanity/dashboard",
"media",
"@sanity/code-input",
"asset-source-unsplash",
"color-list",
"dashboard-widget-netlify",
"datatable",
"@sanity/vision",
"@sanity/production-preview",
"@sanity/google-maps-input",
"@sanity/color-input"
],
"parts": [
{
"name": "part:@sanity/base/schema",
"path": "./schemas/schema.js"
},
{
"implements": "part:@sanity/production-preview/resolve-production-url",
"path": "./node_modules/rs-sanity-schema/actions/resolvers/resolveProductionUrl.js"
},
{
"name": "part:@sanity/desk-tool/structure",
"path": "./deskStructure.js"
},
{
"implements": "part:@sanity/dashboard/config",
"path": "./node_modules/rs-sanity-schema/config/dashboardConfig.js"
},
{
"implements": "part:@sanity/base/theme/variables/override-style",
"path": "./variableOverrides.css"
},
{
"implements": "part:@sanity/base/document-actions/resolver",
"path": "./node_modules/rs-sanity-schema/actions/resolvers/resolveDocumentActions.js"
},
{
"implements": "part:@sanity/base/document-badges/resolver",
"path": "./node_modules/rs-sanity-schema/actions/resolvers/resolveDocumentBadges.js"
}
]
}
Oh, silly me, one more thing... Make sure you copy the /plugins
folder from the root of this node pkg (/node_modules/rs-sanity-schema/plugins/*
) to the root of your sanity project! DUH!
0.2.7
4 years ago
0.2.6
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.1.14
4 years ago
0.1.15
4 years ago
0.2.1
4 years ago
0.2.0
4 years ago
0.1.13
4 years ago
0.1.10
4 years ago
0.1.11
4 years ago
0.1.12
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.9
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago