datocms
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDatoCMS Agent Skill
DatoCMS Agent 技能
This skill provides comprehensive guidance for working with DatoCMS, a headless CMS platform. It combines decision frameworks, executable workflows, and complete documentation reference.
本技能为使用DatoCMS(一款无头CMS平台)提供全面指导,结合了决策框架、可执行工作流和完整的文档参考。
When to Use This Skill
何时使用本技能
Use this skill when:
- Building or maintaining a DatoCMS project
- Integrating DatoCMS with frameworks (Next.js, React, Vue, etc.)
- Managing content models, records, or assets via API
- Setting up webhooks or real-time updates
- Working with DatoCMS plugins or the Plugin SDK
- Migrating content or managing multiple environments
- Troubleshooting DatoCMS API or integration issues
Do NOT use this skill for:
- Generic CMS comparisons (unless DatoCMS-specific)
- Non-DatoCMS headless CMS implementations
- Basic frontend development unrelated to DatoCMS
在以下场景使用本技能:
- 构建或维护DatoCMS项目
- 将DatoCMS与框架集成(Next.js、React、Vue等)
- 通过API管理内容模型、记录或资产
- 设置Webhooks或实时更新
- 使用DatoCMS插件或Plugin SDK
- 迁移内容或管理多环境
- 排查DatoCMS API或集成问题
请勿在以下场景使用本技能:
- 通用CMS对比(除非是DatoCMS特定的对比)
- 非DatoCMS的无头CMS实现
- 与DatoCMS无关的基础前端开发
API Decision Guide
API决策指南
DatoCMS provides multiple APIs for different use cases:
DatoCMS为不同使用场景提供了多种API:
Content Delivery API (CDA)
内容交付API(CDA)
Use for: Fetching published content for production sites
- GraphQL-based, read-only
- Optimized for speed with global CDN
- Supports filtering, sorting, pagination
- Best for: SSR, SSG, client-side fetching
Example:
typescript
import { executeQuery } from '@datocms/cda-client';
const result = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN,
environment: 'main'
});适用场景: 为生产站点获取已发布内容
- 基于GraphQL,只读
- 经全球CDN优化,速度更快
- 支持过滤、排序、分页
- 最佳使用场景:SSR、SSG、客户端数据获取
示例:
typescript
import { executeQuery } from '@datocms/cda-client';
const result = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN,
environment: 'main'
});Content Management API (CMA)
内容管理API(CMA)
Use for: Creating, updating, deleting content and schema
- REST-based with full CRUD operations
- Requires write permissions
- Best for: Admin panels, migrations, automated content creation
Example:
typescript
import { buildClient } from '@datocms/cma-client-node';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// Create a record
const record = await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'New Post',
content: 'Content here'
});适用场景: 创建、更新、删除内容和架构
- 基于REST,支持完整CRUD操作
- 需要写入权限
- 最佳使用场景:管理面板、迁移、自动化内容创建
示例:
typescript
import { buildClient } from '@datocms/cma-client-node';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// 创建记录
const record = await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'New Post',
content: 'Content here'
});Asset API
资产API
Use for: Uploading files and managing assets
- Two-step process: request upload URL, then upload file
- Supports images, videos, documents
适用场景: 上传文件和管理资产
- 两步流程:请求上传URL,然后上传文件
- 支持图片、视频、文档
Real-Time Updates API
实时更新API
Use for: Live preview, collaborative editing
- WebSocket-based
- Reflects draft changes instantly
适用场景: 实时预览、协作编辑
- 基于WebSocket
- 即时反映草稿变更
Getting Started
快速入门
1. API Tokens
1. API令牌
- Go to Settings > API Tokens in your DatoCMS project
- Read-only token for CDA (can be public)
- Full-access token for CMA (keep secret)
- 进入DatoCMS项目的“设置 > API令牌”页面
- 只读令牌用于CDA(可公开)
- 全权限令牌用于CMA(需保密)
2. Install Clients
2. 安装客户端
bash
undefinedbash
undefinedFor content fetching
用于内容获取
npm install @datocms/cda-client
npm install @datocms/cda-client
For content management
用于内容管理
npm install @datocms/cma-client-node
npm install @datocms/cma-client-node
For React/Next.js
用于React/Next.js
npm install react-datocms
undefinednpm install react-datocms
undefined3. Basic Query
3. 基础查询
typescript
import { executeQuery } from '@datocms/cda-client';
const query = `
query {
allBlogPosts {
id
title
slug
publishedAt
}
}
`;
const data = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN
});typescript
import { executeQuery } from '@datocms/cda-client';
const query = `
query {
allBlogPosts {
id
title
slug
publishedAt
}
}
`;
const data = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN
});Workflow Playbooks
工作流手册
1. Schema Management: Create Models & Fields
1. 架构管理:创建模型与字段
When: Setting up new content types or modifying existing ones
typescript
import { buildClient } from '@datocms/cma-client-node';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// Create a model
const model = await client.itemTypes.create({
name: 'Blog Post',
api_key: 'blog_post',
singleton: false
});
// Add fields
await client.fields.create(model.id, {
label: 'Title',
field_type: 'string',
api_key: 'title',
validators: { required: {} }
});
await client.fields.create(model.id, {
label: 'Content',
field_type: 'structured_text',
api_key: 'content'
});适用场景: 设置新内容类型或修改现有类型
typescript
import { buildClient } from '@datocms/cma-client-node';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// 创建模型
const model = await client.itemTypes.create({
name: 'Blog Post',
api_key: 'blog_post',
singleton: false
});
// 添加字段
await client.fields.create(model.id, {
label: 'Title',
field_type: 'string',
api_key: 'title',
validators: { required: {} }
});
await client.fields.create(model.id, {
label: 'Content',
field_type: 'structured_text',
api_key: 'content'
});2. Content Operations: CRUD + Publishing
2. 内容操作:CRUD与发布
When: Managing content records programmatically
typescript
// Create draft
const draft = await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'My Post',
content: { /* DAST structure */ }
});
// Update
await client.items.update(draft.id, {
title: 'Updated Title'
});
// Publish
await client.items.publish(draft.id);
// Unpublish
await client.items.unpublish(draft.id);
// Delete
await client.items.destroy(draft.id);适用场景: 以编程方式管理内容记录
typescript
// 创建草稿
const draft = await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'My Post',
content: { /* DAST结构 */ }
});
// 更新
await client.items.update(draft.id, {
title: 'Updated Title'
});
// 发布
await client.items.publish(draft.id);
// 取消发布
await client.items.unpublish(draft.id);
// 删除
await client.items.destroy(draft.id);3. Asset Uploads: Two-Step Flow
3. 资产上传:两步流程
When: Uploading images, videos, or documents
typescript
import { buildClient } from '@datocms/cma-client-node';
import fs from 'fs';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// Step 1: Create upload request
const path = './image.jpg';
const uploadRequest = await client.uploads.createFromFileOrBlob({
fileOrBlob: fs.createReadStream(path),
filename: 'image.jpg'
});
// Step 2: Use upload in a record
await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'Post with Image',
cover_image: {
upload_id: uploadRequest.id
}
});适用场景: 上传图片、视频或文档
typescript
import { buildClient } from '@datocms/cma-client-node';
import fs from 'fs';
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// 步骤1:创建上传请求
const path = './image.jpg';
const uploadRequest = await client.uploads.createFromFileOrBlob({
fileOrBlob: fs.createReadStream(path),
filename: 'image.jpg'
});
// 步骤2:在记录中使用上传的资产
await client.items.create({
item_type: { type: 'item_type', id: 'blog_post' },
title: 'Post with Image',
cover_image: {
upload_id: uploadRequest.id
}
});4. Migrations: Sandbox to Production
4. 迁移:沙箱到生产环境
When: Testing schema changes before deploying
bash
undefined适用场景: 部署前测试架构变更
bash
undefinedCreate sandbox environment
创建沙箱环境
(Do this in DatoCMS UI: Settings > Environments)
(在DatoCMS UI中操作:设置 > 环境)
Make changes in sandbox
在沙箱中进行变更
DATOCMS_ENVIRONMENT=sandbox node update-schema.js
DATOCMS_ENVIRONMENT=sandbox node update-schema.js
Test in sandbox
在沙箱中测试
Promote to primary environment (via UI or API)
推广到主环境(通过UI或API)
undefinedundefined5. Structured Text (DAST): Handling Rich Content
5. 结构化文本(DAST):处理富文本内容
When: Working with rich text fields
typescript
import { render } from 'datocms-structured-text-to-html-string';
// DAST structure
const structuredText = {
schema: 'dast',
document: {
type: 'root',
children: [
{
type: 'heading',
level: 1,
children: [{ type: 'span', value: 'Hello World' }]
},
{
type: 'paragraph',
children: [
{ type: 'span', value: 'This is ' },
{ type: 'span', marks: ['strong'], value: 'bold text' }
]
}
]
}
};
// Render to HTML
const html = render(structuredText);适用场景: 处理富文本字段
typescript
import { render } from 'datocms-structured-text-to-html-string';
// DAST结构
const structuredText = {
schema: 'dast',
document: {
type: 'root',
children: [
{
type: 'heading',
level: 1,
children: [{ type: 'span', value: 'Hello World' }]
},
{
type: 'paragraph',
children: [
{ type: 'span', value: 'This is ' },
{ type: 'span', marks: ['strong'], value: 'bold text' }
]
}
]
}
};
// 渲染为HTML
const html = render(structuredText);6. Webhooks: Event Notifications
6. Webhooks:事件通知
When: Triggering builds or syncing data on content changes
typescript
// Create webhook via CMA
const webhook = await client.webhooks.create({
name: 'Deploy on Publish',
url: 'https://api.vercel.com/v1/integrations/deploy/...',
events: [
{ entity_type: 'item', event_types: ['publish', 'unpublish'] }
],
http_basic_user: 'user',
http_basic_password: 'pass'
});适用场景: 内容变更时触发构建或同步数据
typescript
// 通过CMA创建Webhook
const webhook = await client.webhooks.create({
name: 'Deploy on Publish',
url: 'https://api.vercel.com/v1/integrations/deploy/...',
events: [
{ entity_type: 'item', event_types: ['publish', 'unpublish'] }
],
http_basic_user: 'user',
http_basic_password: 'pass'
});7. Framework Integration: Next.js Example
7. 框架集成:Next.js示例
When: Building a Next.js site with DatoCMS
typescript
// app/blog/page.tsx
import { executeQuery } from '@datocms/cda-client';
const query = `
query {
allBlogPosts(orderBy: publishedAt_DESC) {
id
title
slug
excerpt
}
}
`;
export default async function BlogPage() {
const { allBlogPosts } = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN!
});
return (
<div>
{allBlogPosts.map(post => (
<article key={post.id}>
<h2>{post.title}</h2>
<p>{post.excerpt}</p>
</article>
))}
</div>
);
}适用场景: 使用DatoCMS构建Next.js站点
typescript
// app/blog/page.tsx
import { executeQuery } from '@datocms/cda-client';
const query = `
query {
allBlogPosts(orderBy: publishedAt_DESC) {
id
title
slug
excerpt
}
}
`;
export default async function BlogPage() {
const { allBlogPosts } = await executeQuery(query, {
token: process.env.DATOCMS_API_TOKEN!
});
return (
<div>
{allBlogPosts.map(post => (
<article key={post.id}>
<h2>{post.title}</h2>
<p>{post.excerpt}</p>
</article>
))}
</div>
);
}MCP Server Integration
MCP服务器集成
DatoCMS provides an official Model Context Protocol (MCP) server for AI agents:
DatoCMS为AI代理提供官方模型上下文协议(MCP)服务器:
Installation
安装
json
{
"mcpServers": {
"datocms": {
"command": "npx",
"args": ["-y", "@datocms/mcp-server"],
"env": {
"DATOCMS_API_TOKEN": "your-full-access-token"
}
}
}
}json
{
"mcpServers": {
"datocms": {
"command": "npx",
"args": ["-y", "@datocms/mcp-server"],
"env": {
"DATOCMS_API_TOKEN": "your-full-access-token"
}
}
}
}Available Tools
可用工具
- - List all content models
list_models - - Get model details with fields
get_model - - List records of a model
list_records - - Get single record by ID
get_record - - Create new record
create_record - - Update existing record
update_record - - Delete record
delete_record
- - 列出所有内容模型
list_models - - 获取包含字段的模型详情
get_model - - 列出某模型的所有记录
list_records - - 通过ID获取单个记录
get_record - - 创建新记录
create_record - - 更新现有记录
update_record - - 删除记录
delete_record
Troubleshooting
故障排除
Common Issues
常见问题
1. "Invalid API token"
- Verify token in Settings > API Tokens
- Check environment variable is loaded
- Ensure token has required permissions (read-only vs full-access)
2. "Model/Field not found"
- Use not
api_keyin queriesid - Check model exists in current environment
- Verify field spelling and case sensitivity
3. "Rate limit exceeded"
- CDA: 30 requests/second (burst: 60)
- CMA: 15 requests/second
- Implement exponential backoff
4. Asset upload fails
- Check file size limits (5GB max)
- Verify file type is supported
- Use method
createFromFileOrBlob
5. Structured text not rendering
- Validate DAST schema structure
- Use official rendering packages
- Check for custom block types
1. "无效API令牌"
- 在“设置 > API令牌”中验证令牌
- 检查环境变量是否已加载
- 确保令牌拥有所需权限(只读 vs 全权限)
2. "未找到模型/字段"
- 在查询中使用而非
api_keyid - 检查模型是否存在于当前环境
- 验证字段拼写和大小写敏感性
3. "超出速率限制"
- CDA:30请求/秒(突发:60)
- CMA:15请求/秒
- 实现指数退避策略
4. 资产上传失败
- 检查文件大小限制(最大5GB)
- 验证文件类型是否受支持
- 使用方法
createFromFileOrBlob
5. 结构化文本无法渲染
- 验证DAST架构结构
- 使用官方渲染包
- 检查是否存在自定义块类型
Debug Checklist
调试清单
- API token is correct and has required permissions
- Environment name matches (main vs sandbox)
- API key names match schema (not display names)
- Request payload matches API documentation
- Check DatoCMS status page for outages
- Review API logs in DatoCMS settings
- API令牌正确且拥有所需权限
- 环境名称匹配(main vs sandbox)
- API键名称与架构匹配(而非显示名称)
- 请求负载符合API文档要求
- 查看DatoCMS状态页面确认是否有服务中断
- 查看DatoCMS设置中的API日志
Documentation Reference
文档参考
Below is the complete index of DatoCMS documentation organized by topic. All links point to Markdown versions for easy parsing.
以下是按主题整理的完整DatoCMS文档索引,所有链接指向Markdown版本以便于解析。
DatoCMS
DatoCMS
Docs
文档
- What is DatoCMS?
- Organizations and accounts
- Project collaborators, roles and permissions
- The content schema
- Organizing content
- Record versioning
- Draft/published system
- Scheduled publishing
- Media Area
- Localization
- Visual Editing
- Collaboration features
- Workflows
- Webhooks
- Plugins
- DatoCMS Site Search
- Project Templates
- How your website and DatoCMS work together
- How to deploy
- Primary and sandbox environments
- Project usages
- Audit Logs
- Introduction to Content Modeling
- Single instance models
- Record ordering
- Hierarchical sorting (Tree-like collections)
- Blocks
- Modular content fields
- Structured text fields
- Link fields
- SEO fields
- Slugs and permalinks
- External video field
- Validations
- Data consistency: key concepts and implications
- Overview of DatoCMS APIs
- DatoCMS Domains and Content Security Policy (CSP)
- Content Delivery API Overview
- Your first request
- How to fetch records
- API headers (environments, drafts, strict mode, cache tags, content link)
- Authentication and permissions
- Error codes & handling failures (CDA)
- Technical Limits (CDA)
- Complexity
- Custom Scalar Types
- Pagination
- Filtering records
- Deep Filtering
- Ordering records
- Localization
- Direct vs. Inverse relationships
- Modular content fields
- Structured text fields
- Hierarchical sorting (Tree-like collections)
- Images and videos
- Filtering uploads
- SEO and favicon
- Meta fields
- Cache Tags
- Changelog
- Content Management API Overview
- Using the JavaScript client
- API versioning
- Authentication
- Environments
- Error codes & handling failures (CMA)
- Pagination
- Asynchronous jobs
- Technical Limits (CMA)
- Record
- List all records
- Create a new record
- Duplicate a record
- Update a record
- Referenced records
- Retrieve a record
- Delete a record
- Publish a record
- Unpublish a record
- Publish items in bulk
- Unpublish items in bulk
- Destroy items in bulk
- Move items to stage in bulk
- Scheduled publication
- Create a new scheduled publication
- Delete a scheduled publication
- Scheduled unpublishing
- Create a new scheduled unpublishing
- Delete a scheduled unpublishing
- Upload
- Create a new upload
- List all uploads
- Retrieve an upload
- Delete an upload
- Update an upload
- Referenced records
- Add tags to assets in bulk
- Put assets into a collection in bulk
- Destroy uploads
- Site
- Retrieve the site
- Update the site's settings
- Model/Block model
- Create a new model/block model
- Update a model/block model
- List all models/block models
- Retrieve a model/block model
- Duplicate model/block model
- Delete a model/block model
- List models referencing another model/block
- Field
- Create a new field
- Update a field
- List all fields of a model/block
- List fields referencing a model/block
- Retrieve a field
- Delete a field
- Duplicate a field
- Fieldset
- Create a new fieldset
- Update a fieldset
- List all fieldsets of a model/block
- Retrieve a fieldset
- Delete a fieldset
- Record version
- Restore an old record version
- List all record versions
- Retrieve a record version
- Upload permission
- Request a new permission to upload a file
- Upload track
- Create a new upload track
- List upload tracks
- Delete an upload track
- Manual tags
- List all manually created upload tags
- Create a new upload tag
- Smart tags
- List all automatically created upload tags
- Upload Collection
- Create a new upload collection
- Update a upload collection
- List all upload collections
- Retrieve a upload collection
- Delete a upload collection
- Search Index
- List all search indexes for a site
- Retrieve a search index
- Create a search index
- Update a search index
- Trigger the indexing process
- Abort a the current indexing process and mark it as failed
- Delete a search index
- Search result
- Search for results
- Search indexing activity
- List all search indexing events
- Retrieve a search indexing event
- Environment
- Fork an existing environment
- Promote an environment to primary
- Rename an environment
- List all environments
- Retrieve a environment
- Delete a environment
- Maintenance mode
- Retrieve maintenence mode
- Activate maintenance mode: this means that the primary environment will be read-only
- De-activate maintenance mode
- Menu Item
- Create a new menu item
- Update a menu item
- List all menu items
- Retrieve a menu item
- Delete a menu item
- Schema Menu Item
- Create a new schema menu item
- Update a schema menu item
- List all schema menu items
- Retrieve a schema menu item
- Delete a schema menu item
- Uploads filter
- Create a new filter
- Update a filter
- List all filters
- Retrieve a filter
- Delete a filter
- Model filter
- Create a new filter
- Update a filter
- List all filters
- Retrieve a filter
- Delete a filter
- Plugin
- Create a new plugin
- Update a plugin
- List all plugins
- Retrieve a plugin
- Delete a plugin
- Retrieve all fields using the plugin
- Workflow
- Create a new workflow
- Update a workflow
- List all workflows
- Retrieve a workflow
- Delete a workflow
- Asynchronous job
- Job result
- Retrieve a job result
- Account
- Organization
- Invitation
- Invite a new user
- Update an invitation
- List all invitations
- Retrieve an invitation
- Delete an invitation
- Resend an invitation
- Collaborator
- Update a collaborator
- List all collaborators
- Retrieve a collaborator
- Retrieve current signed-in user
- Delete a collaborator
- Role
- Create a new role
- Update a role
- List all roles
- Retrieve a role
- Delete a role
- Duplicate a role
- API token
- Create a new API token
- Update an API token
- List all API tokens
- Retrieve an API token
- Rotate API token
- Delete an API token
- Webhook
- Create a new webhook
- Update a webhook
- List all webhooks
- Retrieve a webhook
- Delete a webhook
- Webhook call
- List all webhooks calls
- Retrieve a webhook call
- Re-send the webhook call
- Build trigger
- List all build triggers for a site
- Retrieve a build trigger
- Create build trigger
- Update build trigger
- Trigger a deploy
- Abort a deploy and mark it as failed
- Abort a site search spidering and mark it as failed
- Trigger a new site search spidering of the website
- Delete a build trigger
- Deploy activity
- List all deploy events
- Retrieve a deploy event
- Subscription limit
- Get all the subscription limits
- Get a single subscription limit
- Subscription feature
- Get all the subscription features
- SSO Settings
- Retrieve SSO Settings
- Generate SSO token
- Update SSO Settings
- SSO User
- List all users
- Returns a SSO user
- Copy editors as SSO users
- Delete a SSO user
- SSO Group
- List all SSO groups
- Sync SSO provider groups to DatoCMS roles
- Update a SSO group
- Delete a group
- White-label settings
- Retrieve white-label settings
- Update white-label settings
- Audit log event
- List Audit Log events
- Images API
- Video API
- Asset CDN Settings
- Real-Time Updates API Overview
- How to use it
- API reference
- Limits and pricing
- MCP server
- LLM-ready Docs
- Translating content with AI
- Visual Editing
- Introduction to Environments & Migrations
- Safe iterations using environments
- Configuring the CLI
- Write and test migration scripts
- Apply migrations to primary environment
- Running legacy migration scripts
- Keeping multiple DatoCMS projects in sync
- Structured Text and `dast` format
- Migrating content to Structured Text
- Available Export & Backup Options
- Enterprise Project Exports
- Import space from Contentful
- Import from WordPress
- Importing data from other sources
- Introduction to the DatoCMS Plugin SDK
- Build your first DatoCMS plugin
- Real-world examples
- What hooks are
- Config screen
- Custom pages
- Sidebars and sidebar panels
- Outlets
- Field extensions
- Manual field extensions
- Dropdown actions
- Structured Text customizations
- Asset sources
- Opening modals
- Event hooks
- Customize record presentation
- React UI Components
- Button
- Button group
- Dropdown
- Form
- Section
- Sidebar panel
- Spinner
- Toolbar
- Sidebars and split views
- Additional permissions
- Working with form values
- Publishing to Marketplace
- Releasing new plugin versions
- Migrating from legacy plugins
- How to stream videos efficiently: Raw MP4 Downloads vs HLS Streaming
- Streaming Video Analytics with Mux Data
- Site Search Overview
- Configuration
- How the crawling works
- Perform searches via API
- React search widget
- Vue search widget
- Custom Domain Name for Assets (Enterprise only)
- DatoCMS Pro Tips
- Customize CMS domain
- How to manage a live and a preview site
- Next.js + DatoCMS Overview
- Optimizing calls to DatoCMS
- Managing images
- Displaying videos
- Structured Text fields
- Adding SEO to pages
- Setting up Next.js Draft Mode
- Real-time updates
- DatoCMS Cache Tags and Next.js
- Visual Editing
- Nuxt + DatoCMS Overview
- Include draft contents
- Responsive images
- Displaying videos
- Structured Text fields
- Adding SEO to Nuxt pages
- Real-time updates
- Visual Editing
- SvelteKit + DatoCMS Overview
- Accessing draft/updated content
- Managing images
- Displaying videos
- Structured Text fields
- SEO Management
- Real-time updates
- Visual Editing
- Astro + DatoCMS Overview
- Accessing draft/updated content
- Managing images
- Displaying videos
- Structured Text fields
- SEO Management
- Real-time updates
- Visual Editing
- Remix + DatoCMS Overview
- Managing images
- Displaying videos
- Structured Text fields
- Adding SEO to pages
- Setting up a preview mode
- Real-time updates
- DatoCMS Cache Tags and Remix
- Agency Partner Program Overview
- Clients and Agency mandates
- Partners dashboard
- Enrollment requirements
- Public Profile and Case studies
- Pricing Overview
- Billing and pricing
- Payment failures and billing notifications
- Cancellations and refunds
- Credit card change
- How overages are managed
- Transfer project
- Duplicate or delete project
- Migrating to a new pricing
- 什么是DatoCMS?
- 组织与账户
- 项目协作者、角色与权限
- 内容架构
- 内容组织
- 记录版本控制
- 草稿/发布系统
- 定时发布
- 媒体库
- 本地化
- 可视化编辑
- 协作功能
- 工作流
- Webhooks
- 插件
- DatoCMS站点搜索
- 项目模板
- 网站与DatoCMS的协作方式
- 部署方法
- 主环境与沙箱环境
- 项目使用情况
- 审计日志
- 内容建模入门
- 单实例模型
- 记录排序
- 层级排序(树形集合)
- 块
- 模块化内容字段
- 结构化文本字段
- 链接字段
- SEO字段
- Slug与永久链接
- 外部视频字段
- 验证规则
- 数据一致性:核心概念与影响
- DatoCMS API概览
- DatoCMS域名与内容安全策略(CSP)
- 内容交付API概览
- 你的第一个请求
- 如何获取记录
- API头(环境、草稿、严格模式、缓存标签、内容链接)
- 认证与权限
- 错误代码与故障处理(CDA)
- 技术限制(CDA)
- 复杂度
- 自定义标量类型
- 分页
- 过滤记录
- 深度过滤
- 记录排序
- 本地化
- 直接与反向关系
- 模块化内容字段
- 结构化文本字段
- 层级排序(树形集合)
- 图片与视频
- 过滤上传资产
- SEO与网站图标
- 元字段
- 缓存标签
- 更新日志
- 内容管理API概览
- 使用JavaScript客户端
- API版本控制
- 认证
- 环境
- 错误代码与故障处理(CMA)
- 分页
- 异步任务
- 技术限制(CMA)
- 记录
- 列出所有记录
- 创建新记录
- 复制记录
- 更新记录
- 关联记录
- 获取记录
- 删除记录
- 发布记录
- 取消发布记录
- 批量发布记录
- 批量取消发布记录
- 批量删除记录
- 批量将记录移至指定阶段
- 定时发布
- 创建新的定时发布任务
- 删除定时发布任务
- 定时取消发布
- 创建新的定时取消发布任务
- 删除定时取消发布任务
- 上传资产
- 创建新的上传资产
- 列出所有上传资产
- 获取上传资产
- 删除上传资产
- 更新上传资产
- 关联记录
- 批量为资产添加标签
- 批量将资产放入集合
- 批量删除上传资产
- 站点
- 获取站点信息
- 更新站点设置
- 模型/块模型
- 创建新模型/块模型
- 更新模型/块模型
- 列出所有模型/块模型
- 获取模型/块模型
- 复制模型/块模型
- 删除模型/块模型
- 列出引用其他模型/块的模型
- 字段
- 创建新字段
- 更新字段
- 列出模型/块的所有字段
- 列出引用模型/块的字段
- 获取字段
- 删除字段
- 复制字段
- 字段集
- 创建新字段集
- 更新字段集
- 列出模型/块的所有字段集
- 获取字段集
- 删除字段集
- 记录版本
- 恢复旧记录版本
- 列出所有记录版本
- 获取记录版本
- 上传权限
- 请求新的文件上传权限
- 上传跟踪
- 创建新的上传跟踪
- 列出上传跟踪
- 删除上传跟踪
- 手动标签
- 列出所有手动创建的上传标签
- 创建新的上传标签
- 智能标签
- 列出所有自动创建的上传标签
- 上传集合
- 创建新的上传集合
- 更新上传集合
- 列出所有上传集合
- 获取上传集合
- 删除上传集合
- 搜索索引
- 列出站点的所有搜索索引
- 获取搜索索引
- 创建搜索索引
- 更新搜索索引
- 触发索引流程
- 中止当前索引流程并标记为失败
- 删除搜索索引
- 搜索结果
- 搜索结果
- 搜索索引活动
- 列出所有搜索索引事件
- 获取搜索索引事件
- 环境
- 复制现有环境
- 将环境升级为主环境](https://www.datocms.com/docs/content-management-api/resources/environment/promote.md)
- 重命名环境
- 列出所有环境
- 获取环境
- 删除环境
- 维护模式
- 获取维护模式状态
- 激活维护模式:这意味着主环境将变为只读
- 停用维护模式
- 菜单项
- 创建新菜单项
- 更新菜单项
- 列出所有菜单项
- 获取菜单项
- 删除菜单项
- 架构菜单项
- 创建新架构菜单项
- 更新架构菜单项
- 列出所有架构菜单项
- 获取架构菜单项
- 删除架构菜单项
- 上传资产过滤器
- 创建新过滤器
- 更新过滤器
- 列出所有过滤器
- 获取过滤器
- 删除过滤器
- 模型过滤器
- 创建新过滤器
- 更新过滤器
- 列出所有过滤器
- 获取过滤器
- 删除过滤器
- 插件
- 创建新插件
- 更新插件
- 列出所有插件
- 获取插件
- 删除插件
- 获取使用该插件的所有字段
- 工作流
- 创建新工作流
- 更新工作流
- 列出所有工作流
- 获取工作流
- 删除工作流
- 异步任务
- 任务结果
- 获取任务结果
- 账户
- 组织
- 邀请
- 邀请新用户
- 更新邀请
- 列出所有邀请
- 获取邀请
- 删除邀请
- 重新发送邀请
- 协作者
- 更新协作者
- 列出所有协作者
- 获取协作者
- 获取当前登录用户
- 删除协作者
- 角色
- 创建新角色
- 更新角色
- 列出所有角色
- 获取角色
- 删除角色
- 复制角色
- API令牌
- 创建新API令牌
- 更新API令牌
- 列出所有API令牌
- 获取API令牌
- 轮换API令牌
- 删除API令牌
- Webhook
- 创建新Webhook
- 更新Webhook
- 列出所有Webhook
- 获取Webhook
- 删除Webhook
- Webhook调用
- 列出所有Webhook调用
- 获取Webhook调用
- 重新发送Webhook调用
- 构建触发器
- 列出站点的所有构建触发器
- 获取构建触发器
- 创建构建触发器
- 更新构建触发器
- 触发部署
- 中止部署并标记为失败
- 中止站点搜索爬取并标记为失败
- 触发新的站点搜索爬取
- 删除构建触发器
- 部署活动
- 列出所有部署事件
- 获取部署事件
- 订阅限制
- 获取所有订阅限制
- 获取单个订阅限制
- 订阅功能
- 获取所有订阅功能
- SSO设置
- 获取SSO设置
- 生成SSO令牌
- 更新SSO设置
- SSO用户
- 列出所有用户
- 返回SSO用户
- 将编辑器复制为SSO用户
- 删除SSO用户
- SSO组
- 列出所有SSO组
- 将SSO提供商组同步到DatoCMS角色
- 更新SSO组
- 删除组
- 白标设置
- 获取白标设置
- 更新白标设置
- 审计日志事件
- 列出审计日志事件
- 图片API
- 视频API
- 资产CDN设置
- 实时更新API概览
- 如何使用
- API参考
- 限制与定价
- MCP服务器
- LLM就绪文档
- 使用AI翻译内容
- 可视化编辑
- 环境与迁移入门
- 使用环境进行安全迭代
- 配置CLI
- 编写并测试迁移脚本
- 将迁移应用到主环境
- 运行旧版迁移脚本
- 保持多个DatoCMS项目同步
- 结构化文本与格式
dast - 将内容迁移到结构化文本
- 可用的导出与备份选项
- 企业项目导出
- 从Contentful导入空间
- 从WordPress导入
- 从其他来源导入数据
- DatoCMS Plugin SDK入门
- 构建你的第一个DatoCMS插件
- 实际示例
- 什么是钩子
- 配置界面
- 自定义页面
- 侧边栏与侧边栏面板
- 出口
- 字段扩展
- 手动字段扩展
- 下拉操作
- 结构化文本自定义
- 资产来源
- 打开模态框
- 事件钩子
- 自定义记录展示
- React UI组件
- 按钮
- 按钮组
- 下拉菜单
- 表单
- 章节
- 侧边栏面板
- 加载指示器
- 工具栏
- 侧边栏与拆分视图
- 额外权限
- 处理表单值
- 发布到市场
- 发布插件新版本
- 从旧版插件迁移
- 如何高效流式传输视频:原始MP4下载 vs HLS流式传输
- 使用Mux Data进行流式视频分析
- 站点搜索概览
- 配置
- 爬取工作原理
- 通过API执行搜索
- React搜索小部件
- Vue搜索小部件
- 自定义资产域名(仅企业版)
- DatoCMS专业技巧
- 自定义CMS域名
- 如何管理生产站点与预览站点
- Next.js + DatoCMS概览
- 优化DatoCMS调用
- 管理图片
- 展示视频
- 结构化文本字段
- 为页面添加SEO
- 设置Next.js草稿模式
- 实时更新
- DatoCMS缓存标签与Next.js
- 可视化编辑
- Nuxt + DatoCMS概览
- 包含草稿内容
- 响应式图片
- 展示视频
- 结构化文本字段
- 为Nuxt页面添加SEO
- 实时更新
- 可视化编辑
- SvelteKit + DatoCMS概览
- 访问草稿/更新后的内容
- 管理图片
- 展示视频
- 结构化文本字段
- SEO管理
- 实时更新
- 可视化编辑
- Astro + DatoCMS概览
- 访问草稿/更新后的内容
- 管理图片
- 展示视频
- 结构化文本字段
- SEO管理
- 实时更新
- 可视化编辑
- Remix + DatoCMS概览
- 管理图片
- 展示视频
- 结构化文本字段
- 为页面添加SEO
- 设置预览模式
- 实时更新
- DatoCMS缓存标签与Remix
- 代理合作伙伴计划概览
- 客户与代理任务
- 合作伙伴仪表板
- 注册要求
- 公开资料与案例研究
- 定价概览
- 计费与定价
- 支付失败与计费通知
- 取消与退款
- 更换信用卡
- 超额使用管理
- 转移项目
- 复制或删除项目
- 迁移到新定价
Official packages READMEs
官方包README
- @datocms/cma-client - Content Management API Client
- @datocms/cda-client - Content Delivery API Client
- datocms-cli - CLI Tool
- datocms-cli - Contentful Import Plugin
- datocms-cli - WordPress Import Plugin
- DatoCMS Plugins - Examples Repository
- react-datocms - Main Package
- react-datocms - <Image> and <SRCImage> Components
- react-datocms - <StructuredText> Component
- react-datocms - <VideoPlayer> Component
- react-datocms - useQuerySubscription Hook
- react-datocms - useSiteSearch Hook
- react-datocms - SEO Meta Tags Utilities
- react-datocms - <ContentLink> Component and useContentLink Hook
- vue-datocms - Main Package
- vue-datocms - <datocms-image> and <datocms-naked-image> Components
- vue-datocms - <VideoPlayer> Component
- vue-datocms - <datocms-structured-text> Component
- vue-datocms - useQuerySubscription Composable
- vue-datocms - useSiteSearch Composable
- vue-datocms - useVideoPlayer Composable
- vue-datocms - <datocms-content-link> Component
- astro-datocms - Main Package
- astro-datocms - <Image> Component
- astro-datocms - <Seo> Component
- astro-datocms - <StructuredText> Component
- astro-datocms - <QueryListener> Component
- astro-datocms - <ContentLink> Component
- datocms-svelte - Main Package
- datocms-svelte - <Image> and <NakedImage> Components
- datocms-svelte - <VideoPlayer> Component
- datocms-svelte - <StructuredText> Component
- datocms-svelte - <Head> Component
- datocms-svelte - querySubscription Store
- datocms-svelte - <ContentLink> Component
- datocms-structured-text-utils - Utilities & Types
- datocms-structured-text-to-plain-text - Renderer
- datocms-structured-text-to-markdown - Renderer
- datocms-structured-text-to-html-string - Renderer
- datocms-structured-text-to-dom-nodes - Renderer
- datocms-html-to-structured-text - Converter
- datocms-structured-text-slate-utils - Slate Utilities
- datocms-listen - Real-Time Updates Client
- @datocms/cma-client - 内容管理API客户端
- @datocms/cda-client - 内容交付API客户端
- datocms-cli - CLI工具
- datocms-cli - Contentful导入插件
- datocms-cli - WordPress导入插件
- DatoCMS插件 - 示例仓库
- react-datocms - 主包
- react-datocms - <Image>与<SRCImage>组件
- react-datocms - <StructuredText>组件
- react-datocms - <VideoPlayer>组件
- react-datocms - useQuerySubscription钩子
- react-datocms - useSiteSearch钩子
- react-datocms - SEO元标签工具
- react-datocms - <ContentLink>组件与useContentLink钩子
- vue-datocms - 主包
- vue-datocms - <datocms-image>与<datocms-naked-image>组件
- vue-datocms - <VideoPlayer>组件
- vue-datocms - <datocms-structured-text>组件
- vue-datocms - useQuerySubscription组合式函数
- vue-datocms - useSiteSearch组合式函数
- vue-datocms - useVideoPlayer组合式函数
- vue-datocms - <datocms-content-link>组件
- astro-datocms - 主包
- astro-datocms - <Image>组件
- astro-datocms - <Seo>组件
- astro-datocms - <StructuredText>组件
- astro-datocms - <QueryListener>组件
- astro-datocms - <ContentLink>组件
- datocms-svelte - 主包
- datocms-svelte - <Image>与<NakedImage>组件
- datocms-svelte - <VideoPlayer>组件
- datocms-svelte - <StructuredText>组件
- datocms-svelte - <Head>组件
- datocms-svelte - querySubscription存储
- datocms-svelte - <ContentLink>组件
- datocms-structured-text-utils - 工具与类型
- datocms-structured-text-to-plain-text - 渲染器
- datocms-structured-text-to-markdown - 渲染器
- datocms-structured-text-to-html-string - 渲染器
- datocms-structured-text-to-dom-nodes - 渲染器
- datocms-html-to-structured-text - 转换器
- datocms-structured-text-slate-utils - Slate工具
- datocms-listen - 实时更新客户端