initialize sanity but studio on localhost not wokring
27
bun.lock
@@ -10,6 +10,7 @@
|
||||
"@sanity/vision": "^4.10.2",
|
||||
"groq": "^4.10.2",
|
||||
"sanity": "^4.10.2",
|
||||
"styled-components": "^6.1.15",
|
||||
"zod": "^4.1.11",
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -1957,7 +1958,7 @@
|
||||
|
||||
"tsconfig-paths": ["tsconfig-paths@4.2.0", "", { "dependencies": { "json5": "^2.2.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
"tslib": ["tslib@2.6.2", "", {}, "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="],
|
||||
|
||||
"tunnel": ["tunnel@0.0.6", "", {}, "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="],
|
||||
|
||||
@@ -2127,6 +2128,16 @@
|
||||
|
||||
"@babel/register/make-dir": ["make-dir@2.1.0", "", { "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="],
|
||||
|
||||
"@dnd-kit/accessibility/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@dnd-kit/core/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@dnd-kit/modifiers/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@dnd-kit/sortable/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@dnd-kit/utilities/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
|
||||
|
||||
"@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="],
|
||||
@@ -2231,6 +2242,8 @@
|
||||
|
||||
"anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"async-mutex/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"babel-plugin-polyfill-corejs2/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||
|
||||
"bl/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
||||
@@ -2267,8 +2280,12 @@
|
||||
|
||||
"flush-write-stream/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"focus-lock/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"foreground-child/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"framer-motion/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"from2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"ftp/readable-stream": ["readable-stream@1.1.14", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "0.0.1", "string_decoder": "~0.10.x" } }, "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ=="],
|
||||
@@ -2333,14 +2350,14 @@
|
||||
|
||||
"readdir-glob/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="],
|
||||
|
||||
"rxjs/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"sanity/@portabletext/toolkit": ["@portabletext/toolkit@3.0.1", "", { "dependencies": { "@portabletext/types": "^2.0.15" } }, "sha512-z8NGqxKxfP0zuC58hPe8+xFC17qSbQ3nC9DgZmhrr7NUFaENJ6vAHJBsH5QzT7nKUjj++dTn+i4O2Uz9cqiGjA=="],
|
||||
|
||||
"sanity/chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="],
|
||||
|
||||
"styled-components/postcss": ["postcss@8.4.49", "", { "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA=="],
|
||||
|
||||
"styled-components/tslib": ["tslib@2.6.2", "", {}, "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="],
|
||||
|
||||
"svelte-eslint-parser/postcss-selector-parser": ["postcss-selector-parser@7.1.0", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA=="],
|
||||
|
||||
"tar/chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="],
|
||||
@@ -2349,6 +2366,10 @@
|
||||
|
||||
"through2/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"use-callback-ref/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@architect/utils/glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||
|
||||
"@babel/register/make-dir/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
||||
|
||||
BIN
dist/favicon.ico
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
dist/static/apple-touch-icon.png
vendored
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
dist/static/favicon-192.png
vendored
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
dist/static/favicon-512.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/favicon-96.png
vendored
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
dist/static/favicon.ico
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
12
dist/static/favicon.svg
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="512" height="512" fill="#0B0B0B"/>
|
||||
<rect width="256" height="256" fill="#0B0B0B"/>
|
||||
<g clip-path="url(#clip0_261_6485)">
|
||||
<path d="M431.519 304.966L417.597 280.733L350.26 321.759L425.051 226.504L436.358 219.867L433.56 215.662L438.697 209.096L415.097 189.445L404.295 203.215L186.253 330.829L266.869 233.849L417.024 151.513L402.758 123.926L320.972 168.755L361.246 120.336L338.174 100L247.535 209.026L157.515 258.413L226.435 167.267L269.621 144.782L255.906 116.888L130.085 182.407L164.396 136.987L140.429 117.785L68 213.678L69.1238 214.576L82.6554 242.139L162.951 200.31L89.7653 297.077L101.76 306.69L108.893 320.484L193.431 274.12L100.338 386.121L123.411 406.457L128.044 400.883L352.623 269.018L278.061 364.014L279.277 365.029L279.162 365.1L294.62 392.002L393.791 331.561L355.604 393.207L381.199 410L442 311.863L431.519 304.966Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_261_6485">
|
||||
<rect width="374" height="310" fill="white" transform="translate(68 100)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
19
dist/static/manifest.webmanifest
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/favicon-96.png",
|
||||
"type": "image/png",
|
||||
"sizes": "96x96"
|
||||
},
|
||||
{
|
||||
"src": "/static/favicon-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "/static/favicon-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
dist/static/robots.txt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# allow crawling everything by default
|
||||
User-agent: *
|
||||
Disallow:
|
||||
12794
package-lock.json
generated
Normal file
@@ -44,6 +44,7 @@
|
||||
"@sanity/vision": "^4.10.2",
|
||||
"groq": "^4.10.2",
|
||||
"sanity": "^4.10.2",
|
||||
"styled-components": "^6.1.15",
|
||||
"zod": "^4.1.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import { defineConfig } from "sanity";
|
||||
import {structureTool} from 'sanity/structure';
|
||||
import {visionTool} from '@sanity/vision';
|
||||
import schemas from './schemas'
|
||||
|
||||
const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID!;
|
||||
const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET!;
|
||||
|
||||
export default defineConfig({
|
||||
name: "default",
|
||||
title: 'briannelson.dev',
|
||||
basePath: "/admin",
|
||||
|
||||
projectId,
|
||||
dataset,
|
||||
|
||||
plugins: [
|
||||
structureTool(),
|
||||
visionTool()
|
||||
],
|
||||
|
||||
schema: {types: schemas}
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
import { pages } from "./documents/pages";
|
||||
|
||||
export default [
|
||||
pages
|
||||
]
|
||||
15
src/lib/components/MyPreviewComponent.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import {Stack, Card, Flex, Text } from '@sanity/ui'
|
||||
|
||||
export default function MyPreviewComponent(props: any) {
|
||||
const {title, url} = props
|
||||
|
||||
return (
|
||||
<Flex align="center" justify="center" height="fill">
|
||||
<Card border padding={3}>
|
||||
<Stack space={3} marginBottom={3}>
|
||||
<img src={url} alt={title} style={{width: '100%'}} />
|
||||
</Stack>
|
||||
</Card>
|
||||
</Flex>
|
||||
)
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
import {createClient} from '@sanity/client';
|
||||
import { PUBLIC_SANITY_PROJECT_ID, PUBLIC_SANITY_DATASET } from '$env/static/public'
|
||||
|
||||
export const sanity = createClient({
|
||||
projectId: import.meta.env.PUBLIC_SANITY_PROJECT_ID,
|
||||
dataset: import.meta.env.PUBLIC_SANITY_DATASET,
|
||||
projectId: PUBLIC_SANITY_PROJECT_ID,
|
||||
dataset: PUBLIC_SANITY_DATASET,
|
||||
apiVersion: '2025-09-01',
|
||||
useCdn: true,
|
||||
})
|
||||
@@ -1,7 +1,7 @@
|
||||
import groq from "groq";
|
||||
|
||||
export const homepage = groq`{
|
||||
"pageData": *[_type == 'homepage']{
|
||||
export const HOMEPAGE = groq`{
|
||||
"page": *[_type == 'homepage'][0]{
|
||||
...,
|
||||
tech[]-> {
|
||||
title,
|
||||
|
||||
9
src/routes/+page.server.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import {error} from '@sveltejs/kit';
|
||||
import {sanity} from '$lib/sanity/client';
|
||||
import {HOMEPAGE} from '$lib/sanity/queries';
|
||||
|
||||
export async function load({ setHeaders }) {
|
||||
const { page, projects } = await sanity.fetch(HOMEPAGE)
|
||||
setHeaders({'cache-control': 'public, s-maxage=300, stale-while-revalidate=86400'})
|
||||
return { page, projects }
|
||||
}
|
||||
@@ -1,2 +1,10 @@
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<script lang="ts">
|
||||
export let data: {
|
||||
page: any,
|
||||
projects: any[]
|
||||
}
|
||||
console.log(JSON.stringify(data.page[0], null, 2))
|
||||
</script>
|
||||
|
||||
<h1 class="text-3xl font-bold mb-4">{data.page.title}</h1>
|
||||
<p>Visit <a class="text-blue-500 underline" href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
|
||||
|
||||
29
studio/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# Dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# Compiled Sanity Studio
|
||||
/dist
|
||||
|
||||
# Temporary Sanity runtime, generated by the CLI on every dev server start
|
||||
/.sanity
|
||||
|
||||
# Logs
|
||||
/logs
|
||||
*.log
|
||||
|
||||
# Coverage directory used by testing tools
|
||||
/coverage
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# Typescript
|
||||
*.tsbuildinfo
|
||||
|
||||
# Dotenv and similar local-only files
|
||||
*.local
|
||||
9
studio/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Sanity Clean Content Studio
|
||||
|
||||
Congratulations, you have now installed the Sanity Content Studio, an open-source real-time content editing environment connected to the Sanity backend.
|
||||
|
||||
Now you can do the following things:
|
||||
|
||||
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
|
||||
- [Join the Sanity community](https://www.sanity.io/community/join?utm_source=readme)
|
||||
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
|
||||
2608
studio/bun.lock
Normal file
3
studio/eslint.config.mjs
Normal file
@@ -0,0 +1,3 @@
|
||||
import studio from '@sanity/eslint-config-studio'
|
||||
|
||||
export default [...studio]
|
||||
38
studio/package.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "briannelsondev",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"main": "package.json",
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"dev": "sanity dev",
|
||||
"start": "sanity start",
|
||||
"build": "sanity build",
|
||||
"deploy": "sanity deploy",
|
||||
"deploy-graphql": "sanity graphql deploy"
|
||||
},
|
||||
"keywords": [
|
||||
"sanity"
|
||||
],
|
||||
"dependencies": {
|
||||
"@sanity/code-input": "^6.0.1",
|
||||
"@sanity/vision": "^4.10.2",
|
||||
"react": "^19.1",
|
||||
"react-dom": "^19.1",
|
||||
"sanity": "^4.10.2",
|
||||
"styled-components": "^6.1.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sanity/eslint-config-studio": "^5.0.2",
|
||||
"@types/react": "^19.1",
|
||||
"eslint": "^9.28",
|
||||
"prettier": "^3.5",
|
||||
"typescript": "^5.8"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"printWidth": 100,
|
||||
"bracketSpacing": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
}
|
||||
15
studio/sanity.cli.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import {defineCliConfig} from 'sanity/cli'
|
||||
|
||||
export default defineCliConfig({
|
||||
api: {
|
||||
projectId: 'etj370e2',
|
||||
dataset: 'production'
|
||||
},
|
||||
deployment: {
|
||||
/**
|
||||
* Enable auto-updates for studios.
|
||||
* Learn more at https://www.sanity.io/docs/cli#auto-updates
|
||||
*/
|
||||
autoUpdates: true,
|
||||
}
|
||||
})
|
||||
27
studio/sanity.config.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import {defineConfig} from 'sanity'
|
||||
import {structureTool} from 'sanity/structure'
|
||||
import {visionTool} from '@sanity/vision'
|
||||
import {schemaTypes} from './schemaTypes'
|
||||
import { codeInput } from '@sanity/code-input';
|
||||
|
||||
const projectId = process.env.PUBLIC_SANITY_PROJECT_ID!;
|
||||
const dataset = process.env.PUBLIC_SANITY_DATASET!;
|
||||
|
||||
export default defineConfig({
|
||||
name: 'default',
|
||||
title: 'briannelson.dev',
|
||||
basePath: "/admin",
|
||||
|
||||
projectId,
|
||||
dataset,
|
||||
|
||||
plugins: [
|
||||
structureTool(),
|
||||
visionTool(),
|
||||
codeInput(),
|
||||
],
|
||||
|
||||
schema: {
|
||||
types: schemaTypes,
|
||||
},
|
||||
})
|
||||
@@ -1,4 +1,4 @@
|
||||
import MyPreviewComponent from '@/components/MyPreviewComponent';
|
||||
import MyPreviewComponent from '../../../src/lib/components/MyPreviewComponent';
|
||||
import { defineField, defineType } from 'sanity';
|
||||
|
||||
export const newsPost = defineType({
|
||||
@@ -1,5 +1,6 @@
|
||||
import MyPreviewComponent from "@/components/MyPreviewComponent";
|
||||
|
||||
import { defineField, defineType } from "sanity";
|
||||
import MyPreviewComponent from "../../../src/lib/components/MyPreviewComponent";
|
||||
|
||||
export const technologies = defineType({
|
||||
name: 'technologies',
|
||||
49
studio/schemaTypes/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import blogs from "./documents/blogs";
|
||||
import { categories } from "./documents/categories";
|
||||
import { frontend } from "./documents/frontend";
|
||||
import { homepage } from "./documents/homepage";
|
||||
import { mediaLibrary } from "./documents/mediaLibrary";
|
||||
import metadata from "./documents/metadata";
|
||||
import navigation from "./documents/navigation";
|
||||
import { newsPost } from "./documents/newsPosts";
|
||||
import { pages } from "./documents/pages";
|
||||
import { projects } from "./documents/projects";
|
||||
import siteSettings from "./documents/siteSettings";
|
||||
import { technologies } from "./documents/technologies";
|
||||
import blockContent from "./objects/blockContent";
|
||||
import contact from "./objects/contact";
|
||||
import { cta } from "./objects/cta";
|
||||
import { launchDate } from "./objects/feobj/launchDate";
|
||||
import { newsData } from "./objects/feobj/newsData";
|
||||
import { productInfo } from "./objects/feobj/productInfo";
|
||||
import { qrCode } from "./objects/feobj/qrCode";
|
||||
import { resultsSum } from "./objects/feobj/resultsSumm";
|
||||
import { scores } from "./objects/feobj/scores";
|
||||
import { seo } from "./objects/seo";
|
||||
import { stats } from "./objects/stats";
|
||||
|
||||
export const schemaTypes = [
|
||||
pages,
|
||||
siteSettings,
|
||||
homepage,
|
||||
frontend,
|
||||
contact,
|
||||
metadata,
|
||||
navigation,
|
||||
blogs,
|
||||
blockContent,
|
||||
seo,
|
||||
mediaLibrary,
|
||||
projects,
|
||||
categories,
|
||||
stats,
|
||||
cta,
|
||||
qrCode,
|
||||
resultsSum,
|
||||
scores,
|
||||
productInfo,
|
||||
newsData,
|
||||
newsPost,
|
||||
technologies,
|
||||
launchDate,
|
||||
]
|
||||
@@ -1,5 +1,6 @@
|
||||
import MyPreviewComponent from '@/components/MyPreviewComponent';
|
||||
|
||||
import { defineField, defineType } from 'sanity';
|
||||
import MyPreviewComponent from '../../../../src/lib/components/MyPreviewComponent';
|
||||
|
||||
export const productInfo = defineType({
|
||||
name: 'productInfo',
|
||||
@@ -1,5 +1,6 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
import MyPreviewComponent from '../../../components/MyPreviewComponent'
|
||||
import MyPreviewComponent from '../../../../src/lib/components/MyPreviewComponent';
|
||||
|
||||
|
||||
export const qrCode = defineType({
|
||||
name: 'qrCode',
|
||||
1
studio/static/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
Files placed here will be served by the Sanity server under the `/static`-prefix
|
||||
17
studio/tsconfig.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "Preserve",
|
||||
"moduleDetection": "force",
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -3,5 +3,14 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), sveltekit()]
|
||||
plugins: [tailwindcss(), sveltekit()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/admin': {
|
||||
target: 'http://localhost:3333',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/admin/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||