😀Sanity.io là gì? Hướng dẫn dành cho người mới bắt đầu (ok)
https://medium.com/@swhabitation/what-is-sanity-a-beginner-friendly-guide-6c9427cccda8
Setting up your Studio
— Create a new Studio with Sanity CLI
npm create sanity@latest -- --project 9pljig1i --dataset production --template clean --typescript --output-path studio-lionel1
cd studio-lionel1— Run Sanity Studio locally
npm run dev— Log in to the Studio
http://localhost:3333Setting up your Studio
— Create a new document type
import {defineField, defineType} from 'sanity'
export const postType = defineType({
name: 'post',
title: 'Post',
type: 'document',
fields: [
defineField({
name: 'title',
type: 'string',
validation: (rule) => rule.required(),
}),
defineField({
name: 'slug',
type: 'slug',
options: {source: 'title'},
validation: (rule) => rule.required(),
}),
defineField({
name: 'publishedAt',
type: 'datetime',
initialValue: () => new Date().toISOString(),
validation: (rule) => rule.required(),
}),
defineField({
name: 'image',
type: 'image',
}),
defineField({
name: 'body',
type: 'array',
of: [{type: 'block'}],
}),
],
})— Register the post schema type to the Studio schema
post schema type to the Studio schema— Publish your first document
Querying content with GROQ
— Open the Vision tool
— Write your first GROQ query
— Run the query
Querying content with GROQ
— Install a new Next.js application
— Install Sanity dependencies
— Start the development server
— Configure the Sanity client
— Display content on the homepage
Tokens

Hệ thống quản lý nội dung (CMS)
CMS không đầu ( Hệ thống quản lý nội dung )
CMS không cần đầu hoạt động như thế nào?
Sự tỉnh táo là gì?
Last updated