svelte and nx rewrite
This commit is contained in:
@@ -5,7 +5,5 @@ Congratulations, you have now installed the Sanity Content Studio, an open-sourc
|
||||
Now you can do the following things:
|
||||
|
||||
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
|
||||
- Check out the example frontend: [React/Next.js](https://github.com/sanity-io/tutorial-sanity-blog-react-next)
|
||||
- [Read the blog post about this template](https://www.sanity.io/blog/build-your-own-blog-with-sanity-and-next-js?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)
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
"@repo/sanity-connection": "*",
|
||||
"@repo/ui": "*",
|
||||
"@sanity/document-internationalization": "^3.3.3",
|
||||
"@sanity/vision": "^4.1.1",
|
||||
"@sanity/vision": "^4.2.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"sanity": "^4.1.1",
|
||||
"sanity": "^4.2.0",
|
||||
"sanity-plugin-link-field": "^1.4.0",
|
||||
"sanity-plugin-media": "^3.0.4",
|
||||
"sanity-plugin-seo": "^1.3.1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"generates": "../client/src/sanity/sanity.types.ts",
|
||||
"generates": "../client-svelte/src/lib/sanity.types.ts",
|
||||
"path": "./schemaTypes/*.ts"
|
||||
}
|
||||
@@ -39,15 +39,17 @@ export default defineConfig({
|
||||
.child(S.document().schemaType('settings').documentId('settings').title('Settings')),
|
||||
]),
|
||||
}),
|
||||
// @ts-ignore
|
||||
linkField({
|
||||
linkableSchemaTypes: ['custom'],
|
||||
}),
|
||||
presentationTool({
|
||||
previewUrl: {
|
||||
origin: sanityConnection.previewUrl ?? 'http://localhost:3000',
|
||||
origin: sanityConnection.previewUrl ?? 'http://localhost:5173',
|
||||
preview: '/',
|
||||
previewMode: {
|
||||
enable: '/api/draft-mode/enable',
|
||||
enable: '/preview/enable',
|
||||
disable: '/preview/disable',
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -10,11 +10,10 @@ export default defineField({
|
||||
title: 'Alt Text',
|
||||
type: 'string',
|
||||
description: 'Important for SEO and accessibility',
|
||||
validation: (Rule) => Rule.required().min(1).max(100),
|
||||
validation: (Rule) => Rule.max(100),
|
||||
}),
|
||||
],
|
||||
options: {
|
||||
hotspot: true,
|
||||
},
|
||||
validation: (Rule) => Rule.required()
|
||||
})
|
||||
|
||||
@@ -16,6 +16,7 @@ export default defineType({
|
||||
defineField({
|
||||
name: 'title',
|
||||
title: 'Page Title',
|
||||
initialValue: 'Home',
|
||||
type: 'string',
|
||||
validation: (Rule) => Rule.required(),
|
||||
group: 'header',
|
||||
|
||||
@@ -10,24 +10,26 @@ export default defineType({
|
||||
defineField({
|
||||
name: 'backgroundImage',
|
||||
title: 'Background Image',
|
||||
type: 'imageWithAlt',
|
||||
validation: (Rule) => Rule.required(),
|
||||
type: 'imageWithAlt'
|
||||
}),
|
||||
defineField({
|
||||
name: 'title',
|
||||
title: 'Title',
|
||||
initialValue: 'Welcome to Our Site',
|
||||
type: 'string',
|
||||
validation: (Rule) => Rule.required().min(1).max(100),
|
||||
}),
|
||||
defineField({
|
||||
name: 'description',
|
||||
title: 'Description',
|
||||
type: 'blockContent',
|
||||
validation: (Rule) => Rule.required(),
|
||||
type: 'blockContent'
|
||||
}),
|
||||
defineField({
|
||||
name: 'button',
|
||||
title: 'Button',
|
||||
initialValue: {
|
||||
text: 'Get Started',
|
||||
},
|
||||
type: 'button',
|
||||
validation: (Rule) => Rule.required(),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user