# Strapi Documentation - [云账户账单详情](https://strapi.nodejs.cn/cloud/account/account-billing.md): 账单详情和发票在个人资料页面管理,可以在此更新付款方式并查看发票历史记录。 - [云配置文件设置](https://strapi.nodejs.cn/cloud/account/account-settings.md): 个人资料页面的设置包括账户详情、已连接的账户以及账户删除选项。 - [云数据库配置](https://strapi.nodejs.cn/cloud/advanced/database.md): 默认的 PostgreSQL 可以通过调整配置和环境变量来替换为任何支持的 SQL 数据库。 - [云邮件提供商](https://strapi.nodejs.cn/cloud/advanced/email.md): 第三方电子邮件服务通过插件和环境变量集成,以替代默认发件人。 - [Strapi Cloud 的中间件配置](https://strapi.nodejs.cn/cloud/advanced/middlewares.md): 在 Strapi Cloud 上,中间件自定义必须放在 config/env/production/middlewares 中。对全局配置文件的更改在部署时会被覆盖。 - [为 Strapi Cloud 上传提供商配置](https://strapi.nodejs.cn/cloud/advanced/upload.md): 像 S3 或 Cloudinary 这样的外部存储需要插件设置、安全中间件和云变量。 - [Strapi 云的上传大小限制](https://strapi.nodejs.cn/cloud/advanced/upload-size-limits.md): 所有方案中,非图片文件的大小上限为 200 MB。图片文件的推荐最大值基于内存,并根据格式、方案以及媒体库设置而有所不同。要上传更大的图片,请禁用响应式友好上传和尺寸优化。 - [命令行接口 (CLI) {#command-line-interface-cli}](https://strapi.nodejs.cn/cloud/cli/cloud-cli.md): CLI 命令处理登录、项目关联、部署、列出和注销,无需远程仓库。 - [Strapi 云基础 {#strapi-cloud-fundamentals}](https://strapi.nodejs.cn/cloud/cloud-fundamentals.md): Strapi Cloud 是一个用于部署 Strapi CMS 项目的 PaaS 托管平台,提供三种具有不同功能和支持级别的定价方案,两种用户角色(所有者和维护者),以及与自托管服务器行为完全相同的 REST/GraphQL API。 🌐 Strapi Cloud is a PaaS hosting platform for deploying Strapi CMS projects, offering three pricing plans with different features and support levels, two user roles (owners and maintainers), and REST/GraphQL APIs that behave identically to self-hosted servers. - [云缓存与性能 {#cloud-caching--performance}](https://strapi.nodejs.cn/cloud/getting-started/caching.md): 通过 Cache-Control 头进行边缘缓存可以减少大型静态内容的延迟和服务器负载。 - [Strapi 云端 - 仪表板部署](https://strapi.nodejs.cn/cloud/getting-started/deployment.md): 通过仪表板在 Strapi Cloud 上部署你的 Strapi 项目,方法是选择一个计划,连接 Git 仓库,配置项目设置,并设置计费详情。 🌐 Deploy your Strapi project on Strapi Cloud using the dashboard by choosing a plan, connecting a Git repository, configuring your project settings, and setting up billing details. - [Strapi 云端 - CLI 部署](https://strapi.nodejs.cn/cloud/getting-started/deployment-cli.md): 使用 strapi login、strapi link 和 strapi deploy CLI 命令将 Strapi 项目部署到 Strapi Cloud,并可选择在 git 仓库提交时自动部署。 🌐 Deploy a Strapi project to Strapi Cloud using the strapi login, strapi link, and strapi deploy CLI commands, with optional automatic deployment on git repository commits. - [云项目部署](https://strapi.nodejs.cn/cloud/getting-started/deployment-options.md): 使用 Cloud 仪表板或 CLI 在 Strapi 云上部署你的 Strapi 应用,我们为这两种方法提供了逐步指南。 🌐 Deploy your Strapi application on Strapi Cloud using either the Cloud dashboard or the CLI, with step-by-step guides provided for both methods. - [云计费与使用 {#cloud-billing--usage}](https://strapi.nodejs.cn/cloud/getting-started/usage-billing.md): Strapi Cloud 提供三种方案(入门版、专业版和企业版),按照使用量计费,费用根据 API 请求次数、资源存储和带宽而异,超出部分每月收费;未支付发票或违反方案条款的项目可能会被暂停。 🌐 Strapi Cloud offers three plans (Starter, Pro, and Business) with usage-based pricing that varies by API requests, asset storage, and bandwidth, plus overages charged monthly; projects may be suspended for unpaid invoices or plan violations. - [欢迎使用 Strapi Cloud 文档! {#welcome-to-the-strapi-cloud-documentation}](https://strapi.nodejs.cn/cloud/intro.md): Strapi Cloud 是一个完全托管的托管平台,用于部署 Strapi 应用,它抽象了基础设施的复杂性,同时提供内容管理、协作和合规功能。 🌐 Strapi Cloud is a fully managed hosting platform for deploying Strapi applications, abstracting infrastructure complexity while enabling content management, collaboration, and compliance features. - [云项目协作](https://strapi.nodejs.cn/cloud/projects/collaboration.md): 项目所有者通过“分享”按钮邀请维护者,管理待处理的邀请,并撤销访问权限。 - [云部署管理](https://strapi.nodejs.cn/cloud/projects/deploys.md): 部署触发器可以是手动的,也可以在 git 推送时自动触发,并且能够从仪表板或命令行接口取消正在进行的构建。 - [云部署历史和日志](https://strapi.nodejs.cn/cloud/projects/deploys-history.md): 部署选项卡列出每个构建的状态,并允许深入检查构建和部署日志。 - [云项目日志](https://strapi.nodejs.cn/cloud/projects/logs.md): 日志标签在一个可搜索、可筛选的表格中显示你项目的实时日志。点击任意条目以查看其完整消息和元数据。 - [云通知](https://strapi.nodejs.cn/cloud/projects/notifications.md): 铃铛图标打开最近部署事件的动态,在30天后自动清除。 - [云项目可观测性](https://strapi.nodejs.cn/cloud/projects/observability.md): 可观测性标签直接从你的项目仪表板展示使用指标、端点流量和基础设施健康数据。使用它来监控 API 和带宽消耗,识别高流量端点,并跟踪 CPU 和内存使用情况随时间的变化。 🌐 The Observability tab surfaces usage metrics, endpoint traffic, and infrastructure health data directly from your project dashboard. Use it to monitor API and bandwidth consumption, identify high-traffic endpoints, and track CPU and Memory usage over time. - [云项目概览](https://strapi.nodejs.cn/cloud/projects/overview.md): 项目页面列出了所有应用及其状态和快捷操作;选择某一个会打开一个显示指标和控制的仪表板。 - [云项目设置](https://strapi.nodejs.cn/cloud/projects/settings.md): 设置区域涵盖项目级别的控制(通用、账单与发票、计划)以及每个环境的配置。 - [管理面板定制](https://strapi.nodejs.cn/cms/admin-panel-customization.md): 管理员面板可以通过编辑 src/admin/app 并使用 extensions 文件夹来替换徽标、网站图标、本地语言、翻译、主题、打包器或编辑器,从而定制以匹配你的品牌。 - [管理面板打包器](https://strapi.nodejs.cn/cms/admin-panel-customization/bundlers.md): 支持的 JavaScript 打包工具会影响构建和开发流程。 - [管理面板扩展](https://strapi.nodejs.cn/cms/admin-panel-customization/extension.md): 基于 React 的 Strapi 管理面板可以通过 /src/admin/app 在本地进行扩展以满足项目特定的需求,或者通过插件进行扩展,以便在多个 Strapi 实例之间重复使用和分发。 🌐 Strapi's React-based admin panel can be extended locally via /src/admin/app for project-specific needs or through plugins for reusable, distributable extensions across multiple Strapi instances. - [网站图标](https://strapi.nodejs.cn/cms/admin-panel-customization/favicon.md): 通过替换项目根目录下的 favicon.png 文件或配置 strapi::favicon 中间件来替换 Strapi 管理面板的 favicon,然后重新构建应用。 🌐 Replace the Strapi admin panel favicon by replacing the favicon.png file at the project root or configuring the strapi::favicon middleware, then rebuild the app. - [首页自定义](https://strapi.nodejs.cn/cms/admin-panel-customization/homepage.md): 管理面板主页显示默认内容和个人资料小部件,并支持通过 app.widgets.register API 添加自定义内容。 - [管理面板自定义 - URL、主机和路径配置](https://strapi.nodejs.cn/cms/admin-panel-customization/host-port-path.md): 在 config/admin.[ts|js] 文件中配置 Strapi 管理面板的主机、端口和 URL 路径,以更改其默认位置 /admin 的访问位置。 🌐 Configure the Strapi admin panel's host, port, and URL path in the config/admin.[ts|js] file to change where it is accessible from its default location at /admin. - [本地化与翻译](https://strapi.nodejs.cn/cms/admin-panel-customization/locales-translations.md): 通过更新 config.locales 数组来配置管理面板语言,并使用 config.translations 或自定义翻译文件覆盖默认或插件字符串。 - [标志](https://strapi.nodejs.cn/cms/admin-panel-customization/logos.md): 通过扩展管理应用来更新登录和导航徽标。优先使用 SVG 以获得清晰的显示效果;如可能,请提供明/暗两种版本以增强对比度。 - [主题扩展](https://strapi.nodejs.cn/cms/admin-panel-customization/theme-extension.md): 通过在 /src/admin/app.js 中自定义 config.theme.light 和 config.theme.dark 键来扩展 Strapi 管理面板的浅色和夜间模式主题,以覆盖颜色和其他设计系统属性。 🌐 Extend the Strapi admin panel theme for light and dark modes by customizing config.theme.light and config.theme.dark keys in /src/admin/app.js to override colors and other design system properties. - [自定义富文本编辑器](https://strapi.nodejs.cn/cms/admin-panel-customization/wysiwyg-editor.md): Strapi 的管理面板为 richtext 字段内置了 WYSIWYG Markdown 编辑器。你可以通过从市场安装第三方编辑器插件或创建自定义字段以实现更深入的集成来替换它。 🌐 Strapi's admin panel includes a built-in WYSIWYG markdown editor for richtext fields. You can replace it by installing third-party editor plugins from the Marketplace or creating a custom field for deeper integration. - [Docs MCP 服务器](https://strapi.nodejs.cn/cms/ai/docs-mcp-server.md): Docs MCP 服务器向 AI 编码工具公开 Strapi 文档。将其连接到你的 IDE,即可在开发环境中直接获得针对 Strapi 的代码建议和答案。 🌐 A Docs MCP server exposes the Strapi documentation to AI coding tools. Connect it to your IDE to get Strapi-aware code suggestions and answers directly in your development environment. - [面向内容管理的人工智能](https://strapi.nodejs.cn/cms/ai/for-content-managers.md): Strapi AI 帮助内容管理员设计内容结构、翻译内容并从管理面板生成资源元数据。Strapi 还包括一个内置的 MCP 服务器,使 AI 客户端可以通过自然语言管理内容。 🌐 Strapi AI helps content managers design content structures, translate content, and generate asset metadata from the admin panel. Strapi also includes a built-in MCP server that lets AI clients manage content through natural language. - [面向开发者的人工智能](https://strapi.nodejs.cn/cms/ai/for-developers.md): Strapi 文档网站包括免费的 AI 驱动工具,包括 AI 工具栏、由 Kapa 驱动的聊天机器人、llms.txt 文件和 MCP 服务器,以帮助开发者更有效地学习和集成 Strapi。 🌐 The Strapi documentation site includes free AI-powered tools including an AI toolbar, chatbot powered by Kapa, llms.txt files, and MCP servers to help developers learn and integrate Strapi more effectively. - [Strapi 客户端](https://strapi.nodejs.cn/cms/api/client.md): Strapi 客户端是一个 JavaScript 库,它简化了与 Strapi 后端的交互,用于通过 collection()、single() 和 files() 方法获取、创建、更新和删除内容。 🌐 The Strapi Client is a JavaScript library that simplifies interactions with your Strapi back end for fetching, creating, updating, and deleting content through collection(), single(), and files() methods. - [内容 API](https://strapi.nodejs.cn/cms/api/content-api.md): Strapi 的内容 API 通过 REST 和 GraphQL API 为前端应用提供对内容的访问,同时为后端和插件开发提供更底层的文档服务和查询引擎 API。 🌐 Strapi's Content API provides access to your content through REST and GraphQL APIs for front-end applications, plus lower-level Document Service and Query Engine APIs for backend and plugin development. - [文件](https://strapi.nodejs.cn/cms/api/document.md): 文档是一个仅限 API 的概念,表示单个内容类型条目的所有内容变体(本地化、草稿/已发布版本)。使用文档服务 API 在后端操作文档。 🌐 A document is an API-only concept representing all content variations (locales, draft/published versions) for a single content-type entry. Use the Document Service API to manipulate documents on the back-end. - [文档服务 API](https://strapi.nodejs.cn/cms/api/document-service.md): 文档服务 API 是与内容交互的推荐后端 API,提供 findOne、findMany、create、update 和 delete 方法,这些方法可与稳定的 documentId 标识符一起使用,并支持草稿与发布操作。 🌐 The Document Service API is the recommended backend API for interacting with content, providing findOne, findMany, create, update, and delete methods that work with stable documentId identifiers and support Draft & Publish operations. - [使用文档服务 API 的字段](https://strapi.nodejs.cn/cms/api/document-service/fields.md): 在文档服务 API 查询中使用 fields 参数以选择要随结果返回的特定字段,从而减少在 findOne()、findMany()、create()、update()、delete()、publish() 及其他文档操作中的数据传输量。 🌐 Use the fields parameter in Document Service API queries to select specific fields to return with your results, reducing data payload across findOne(), findMany(), create(), update(), delete(), publish(), and other document operations. - [在文档服务 API 中使用过滤器](https://strapi.nodejs.cn/cms/api/document-service/filters.md): 文档服务 API 提供属性操作符($eq、$lt、$contains 等)和逻辑操作符($and、$or、$not),用于筛选查询结果,并支持区分大小写和不区分大小写的匹配。 🌐 The Document Service API provides attribute operators ($eq, $lt, $contains, etc.) and logical operators ($and, $or, $not) to filter query results with support for case-sensitive and case-insensitive matching. - [在文档服务 API 中使用区域参数](https://strapi.nodejs.cn/cms/api/document-service/locale.md): 文档服务 API 中的 locale 参数允许你使用 findOne()、findMany()、update() 和 delete() 等方法查询、创建、更新、删除、发布和取消发布特定语言版本的文档。 🌐 The locale parameter in the Document Service API lets you query, create, update, delete, publish, and unpublish documents for specific language versions using methods like findOne(), findMany(), update(), and delete(). - [扩展文档服务行为](https://strapi.nodejs.cn/cms/api/document-service/middlewares.md): 文档服务中间件允许你在文档服务方法运行之前和之后执行操作,通过 strapi.documents.use() 注册中间件函数,并可以访问内容类型上下文和方法参数。 🌐 Document Service middlewares allow you to perform actions before and after Document Service methods run by registering middleware functions via strapi.documents.use() with access to content type context and method parameters. - [使用 Document Service API 的 Populate](https://strapi.nodejs.cn/cms/api/document-service/populate.md): 使用 Document Service API 的 populate 参数可以显式加载关系、媒体字段、组件和动态区域,支持一层或多层深度,并在 create()、update()、publish() 和 delete() 操作中使用。 🌐 Use the populate parameter with the Document Service API to explicitly load relations, media fields, components, and dynamic zones at one or multiple levels deep, and within create(), update(), publish(), and delete() operations. - [在文档服务 API 中使用 publicationFilter](https://strapi.nodejs.cn/cms/api/document-service/publication-filter.md): 使用可选的 publicationFilter 参数根据文档草稿与已发布版本之间的关系查询文档,例如从未发布的草稿,或自上次发布以来已被修改的条目。它适用于 findOne()、findFirst()、findMany() 和 count(),并可与其他查询参数结合使用。status 仍然决定你获取的是草稿版本还是已发布版本。 🌐 Use the optional publicationFilter parameter to query documents by the relationship between their draft and published versions, for example drafts that were never published, or entries modified since they were last published. It works with findOne(), findFirst(), findMany(), and count(), and combines with other query parameters. status still decides whether you get the draft or the published version. - [在文档服务 API 中使用排序和分页](https://strapi.nodejs.cn/cms/api/document-service/sort-pagination.md): 使用文档服务 API 的 sort 和分页参数按单个或多个字段排序查询结果,并使用 limit 和 start 控制结果的限制。 🌐 Use the Document Service API's sort and pagination parameters to order query results by single or multiple fields and control result limits with limit and start. - [在文档服务 API 中使用草稿与发布](https://strapi.nodejs.cn/cms/api/document-service/status.md): 使用 Document Service API 的 status 参数可以检索文档的已发布或草稿版本,按状态统计文档数量,并在创建或更新文档时直接发布文档。 🌐 Use the status parameter with the Document Service API to retrieve published or draft versions of documents, count documents by status, and directly publish documents during creation or updates. - [实体服务 API](https://strapi.nodejs.cn/cms/api/entity-service.md): 实体服务 API 是一个后端层,用于处理复杂的内容结构,如组件和动态区域,提供通过 strapi.entityService 的 CRUD 操作、过滤、关系填充和分页功能。 🌐 The Entity Service API is a backend layer that handles complex content structures like components and dynamic zones, providing CRUD operations, filtering, populating relations, and pagination via strapi.entityService. - [组件与动态区域](https://strapi.nodejs.cn/cms/api/entity-service/components-dynamic-zones.md): 使用实体服务 API 在创建或更新条目时创建和更新组件及动态区域。组件是单个对象,而动态区域是具有 component 类型标识符的组件列表。 🌐 Use the Entity Service API to create and update components and dynamic zones while creating or updating entries. Components are single objects while dynamic zones are lists of components with a component type identifier. - [增删改查操作](https://strapi.nodejs.cn/cms/api/entity-service/crud.md): 实体服务 API 通过 findOne()、findMany()、create()、update() 和 delete() 方法对内容执行 CRUD 操作,支持过滤、分页、关联和本地化。 🌐 The Entity Service API performs CRUD operations on content through findOne(), findMany(), create(), update(), and delete() methods, supporting filtering, pagination, relations, and localization. - [使用实体服务 API 进行筛选](https://strapi.nodejs.cn/cms/api/entity-service/filter.md): 使用 findMany() 中的 filters 参数,通过逻辑运算符($and、$or、$not)和属性运算符($eq、$contains、$gt、$between 等)过滤实体服务 API 查询结果。 🌐 Filter Entity Service API query results using logical operators ($and, $or, $not) and attribute operators ($eq, $contains, $gt, $between, etc.) with the filters parameter in findMany(). - [使用实体服务 API 进行排序和分页](https://strapi.nodejs.cn/cms/api/entity-service/order-pagination.md): 使用 sort、start/limit 或 page/pageSize 参数对实体服务 API 查询结果进行排序和分页,以控制结果顺序并检索特定的数据子集。 🌐 Order and paginate Entity Service API query results using sort, start/limit, or page/pageSize parameters to control result ordering and retrieve specific data subsets. - [使用实体服务 API 填充](https://strapi.nodejs.cn/cms/api/entity-service/populate.md): 实体服务 API 的 populate 参数用于获取关系、组件和动态区域。使用 populate: '' 获取所有根级关系,使用数组获取特定字段,使用对象进行带过滤器和嵌套填充的高级查询,或使用片段处理多态内容结构。 🌐 The Entity Service API's populate parameter retrieves relations, components, and dynamic zones. Use populate: '' for all root-level relations, arrays for specific fields, objects for advanced queries with filters and nested populating, or fragments for polymorphic content structures. - [GraphQL API](https://strapi.nodejs.cn/cms/api/graphql.md): GraphQL API 允许对内容类型进行查询和修改,并支持过滤、排序和分页。它使用 documentId 作为唯一标识符,并提供单数和复数查询,支持关系、媒体字段、组件、动态区域和本地化。 🌐 The GraphQL API allows querying and mutating content-types with filtering, sorting, and pagination. It uses documentId as the unique identifier and provides singular and plural queries with support for relations, media fields, components, dynamic zones, and localization. - [GraphQL 的高级策略](https://strapi.nodejs.cn/cms/api/graphql/advanced-policies.md): 策略可以附加到 GraphQL 解析器上以实现复杂的授权规则,例如限制未认证用户的结果或根据组成员身份限制访问。 🌐 Policies can be attached to GraphQL resolvers to implement complex authorization rules, such as limiting results for unauthenticated users or restricting access based on group membership. - [GraphQL 的高级查询](https://strapi.nodejs.cn/cms/api/graphql/advanced-queries.md): Strapi 的 GraphQL API 中的高级查询使用嵌套选择集来获取多级关联,并使用自定义解析器链在解析器之间重用逻辑并应用特定于上下文的行为。 🌐 Advanced queries in Strapi's GraphQL API use nested selection sets to fetch multi-level relations and custom resolver chains to reuse logic across resolvers and apply context-specific behavior. - [在 GraphQL API 中使用 locale 参数](https://strapi.nodejs.cn/cms/api/graphql/locale.md): 使用 GraphQL API 的 locale 参数来查询、创建、更新和删除特定语言环境的文档。 🌐 Use the locale argument with the GraphQL API to query, create, update, and delete documents for a specific locale. - [OpenAPI 规范](https://strapi.nodejs.cn/cms/api/openapi.md): Strapi 提供了一个 CLI 工具,用于自动生成 OpenAPI 3.1.0 规范,记录所有 API 端点、参数和响应。生成的规范可以与 Swagger UI 集成,用于交互式 API 文档。 🌐 Strapi provides a CLI tool to automatically generate OpenAPI 3.1.0 specifications documenting all API endpoints, parameters, and responses. The generated specification can be integrated with Swagger UI for interactive API documentation. - [查询引擎 API](https://strapi.nodejs.cn/cms/api/query-engine.md): 查询引擎 API 通过 strapi.db.query 提供对 Strapi 数据库层的低级、不受限制的后端访问,支持带有筛选、填充、排序和分页的单条和批量操作。 🌐 The Query Engine API provides low-level, unrestricted backend access to Strapi's database layer through strapi.db.query, supporting single and bulk operations with filtering, populating, ordering, and pagination. - [批量操作](https://strapi.nodejs.cn/cms/api/query-engine/bulk-operations.md): 使用查询引擎 API 的批量操作功能,你可以通过 createMany()、updateMany()、deleteMany() 和 count() 方法一次性创建、更新、删除和统计多个条目。 🌐 Bulk Operations with the Query Engine API enable you to create, update, delete, and count multiple entries at once using createMany(), updateMany(), deleteMany(), and count() methods. - [使用查询引擎 API 进行过滤](https://strapi.nodejs.cn/cms/api/query-engine/filtering.md): 查询引擎 API 使用 where 参数结合逻辑运算符($and、$or、$not)以及以 $ 为前缀的属性运算符(比较、字符串匹配、范围)来过滤查询结果。 🌐 The Query Engine API filters query results using the where parameter with logical operators ($and, $or, $not) and attribute operators (comparison, string matching, range) prefixed with $. - [使用查询引擎 API 进行排序和分页](https://strapi.nodejs.cn/cms/api/query-engine/order-pagination.md): 查询引擎 API 支持通过 orderBy 参数对单个或多个属性进行结果排序,包括关联排序,并通过 offset 和 limit 参数进行分页。 🌐 The Query Engine API supports ordering results with the orderBy parameter on single or multiple attributes, including relational ordering, and pagination with offset and limit parameters. - [使用查询引擎 API 填充](https://strapi.nodejs.cn/cms/api/query-engine/populating.md): 查询引擎 API 的 populate 参数在查询中加载相关数据,支持基本填充、选择性属性、过滤嵌套关系以及通过填充片段处理多态结构。 🌐 The Query Engine API's populate parameter loads related data in queries, supporting basic population, selective attributes, filtering nested relations, and polymorphic structures via populate fragments. - [单次操作](https://strapi.nodejs.cn/cms/api/query-engine/single-operations.md): 查询引擎 API 提供了方法来查找、创建、更新和删除单个条目,并支持过滤、选择、分页和关联填充选项。 🌐 The Query Engine API provides methods to find, create, update, and delete individual entries with filtering, selection, pagination, and relation population options. - [REST API参考](https://strapi.nodejs.cn/cms/api/rest.md): Strapi 的 REST API 会自动为内容类型生成端点,使用 GET、POST、PUT 和 DELETE 方法来获取、创建、更新和删除文档,并支持过滤、排序、字段选择和关联填充。 🌐 Strapi's REST API automatically generates endpoints for content-types to fetch, create, update, and delete documents using GET, POST, PUT, and DELETE methods, with support for filtering, sorting, field selection, and relation population. - [过滤器](https://strapi.nodejs.cn/cms/api/rest/filters.md): REST API 筛选功能允许使用 $eq、$contains 和 $between 等操作符对查询结果进行筛选,并支持使用 $and、$or 和 $not 进行复杂筛选,以及跨相关内容进行深度筛选。 🌐 The REST API filters feature allows filtering query results using operators like $eq, $contains, and $between, with support for complex filtering using $and, $or, and $not, as well as deep filtering across related content. - [REST API 指南](https://strapi.nodejs.cn/cms/api/rest/guides/intro.md): 探索关于特定 REST API 主题的详细指南和逐步说明,包括访问创作者字段的 populate 参数和自定义控制器。 🌐 Explore detailed guides and step-by-step instructions on specific REST API topics, including populate parameters and custom controllers for accessing creator fields. - [如何填写创建者字段](https://strapi.nodejs.cn/cms/api/rest/guides/populate-creator-fields.md): 在内容类型模式中启用 populateCreatorFields 选项,并创建路由中间件以在 REST API 响应中包含 createdBy 和 updatedBy 字段。 🌐 Enable the populateCreatorFields option in a content-type schema and create a route middleware to include createdBy and updatedBy fields in REST API responses. - [理解填充](https://strapi.nodejs.cn/cms/api/rest/guides/understanding-populate.md): 在 REST API 查询中,populate 参数在响应中包含默认属性之外的额外字段、关系、组件和动态区域。使用 populate= 获取所有一级深度关系,或者使用嵌套数组和片段语法显式指定字段以获取更深层或有选择的填充。 🌐 The populate parameter in REST API queries includes additional fields, relations, components, and dynamic zones in responses beyond default attributes. Use populate= for all 1-level-deep relations, or explicitly specify fields with nested arrays and fragment syntax for deeper or selective population. - [交互式查询构建器](https://strapi.nodejs.cn/cms/api/rest/interactive-query-builder.md): 一个交互式查询生成工具,可以从你的端点和参数自动生成 REST API 查询 URL,由 qs 库提供支持以处理复杂的嵌套查询。 🌐 An interactive query builder tool that automatically generates REST API query URLs from your endpoint and parameters, powered by the qs library to handle complex nested queries. - [本地化](https://strapi.nodejs.cn/cms/api/rest/locale.md): locale REST API 参数用于检索和管理特定语言的文档,默认使用应用的默认语言环境。使用它可以获取、创建、更新和删除集合类型和单一类型文档的特定语言版本。 🌐 The locale REST API parameter retrieves and manages documents in specific languages, defaulting to the application's default locale. Use it to fetch, create, update, and delete locale-specific versions of documents in both collection and single types. - [参数](https://strapi.nodejs.cn/cms/api/rest/parameters.md): REST API 参数在 Strapi 查询中用于过滤、排序、分页以及选择字段和关联。使用 filters、locale、populate、sort 和 pagination 来优化你的内容请求。 🌐 REST API parameters filter, sort, paginate, and select fields and relations in Strapi queries. Use filters, locale, populate, sort, and pagination to refine your content requests. - [填充并选择](https://strapi.nodejs.cn/cms/api/rest/populate-select.md): 使用 populate 参数在 REST API 响应中包含关系、媒体字段、组件和动态区域。使用 fields 参数仅返回特定字段。 🌐 Use the populate parameter to include relations, media fields, components, and dynamic zones in REST API responses. Use the fields parameter to return only specific fields. - [REST API:publicationFilter](https://strapi.nodejs.cn/cms/api/rest/publication-filter.md): 添加可选的 publicationFilter 查询参数,以根据文档草稿版本与已发布版本之间的关系查询文档,例如从未发布的文档,或自上次发布以来已修改的文档。它可以与其他查询参数结合使用,而 status 仍然决定你获取的是草稿版本还是已发布版本。 🌐 Add the optional publicationFilter query parameter to query documents by the relationship between their draft and published versions, for example documents that were never published, or documents modified since they were last published. It combines with other query parameters, and status still decides whether you get the draft or the published version. - [关系](https://strapi.nodejs.cn/cms/api/rest/relations.md): 在 REST 和 GraphQL API 请求中使用 connect、disconnect 和 set 参数来管理内容类型之间的关系。使用位置参数如 before、after、start 或 end 对关系进行重新排序。 🌐 Use connect, disconnect, and set parameters in REST and GraphQL API requests to manage relations between content-types. Reorder relations using positional arguments like before, after, start, or end. - [排序与分页](https://strapi.nodejs.cn/cms/api/rest/sort-pagination.md): 使用 :asc 或 :desc 语法对 REST API 结果按一个或多个字段进行排序,并使用基于页码或基于偏移量的参数进行分页。 🌐 Sort REST API results on one or multiple fields with :asc or :desc syntax, and paginate using either page-based or offset-based parameters. - [状态](https://strapi.nodejs.cn/cms/api/rest/status.md): REST API 的 status 参数通过文档的发布状态进行过滤,通过传递 status=draft 来返回已发布的版本(默认)或草稿。 🌐 The REST API's status parameter filters documents by their publication state, returning either published versions (default) or drafts by passing status=draft. - [上传文件](https://strapi.nodejs.cn/cms/api/rest/upload.md): /api/upload REST API 端点使你能够将文件上传到媒体库,获取分页文件列表,更新文件元数据,以及从你的 Strapi 应用中删除文件。 🌐 The /api/upload REST API endpoints enable you to upload files to the Media Library, retrieve paginated file lists, update file metadata, and delete files from your Strapi application. - [后端定制](https://strapi.nodejs.cn/cms/backend-customization.md): Strapi 的后端是一个基于 Koa 的服务器,请求会通过全局中间件、路由、控制器、服务和模型,然后 Document 服务才返回响应。 - [控制器](https://strapi.nodejs.cn/cms/backend-customization/controllers.md): 控制器将处理业务逻辑的操作打包在 Strapi 的 MVC 模式中的每个路由内。本文档演示了如何生成控制器、使用 createCoreController 扩展核心控制器,以及将繁重的逻辑委托给服务。 - [后端定制示例手册](https://strapi.nodejs.cn/cms/backend-customization/examples.md): 一本使用 FoodAdvisor 演示应用的真实后端定制示例的烹饪书,演示如何在 Strapi 中实现自定义路由、控制器、服务、策略和中间件。 🌐 A cookbook of real-world backend customization examples using the FoodAdvisor demo application, demonstrating how to implement custom routes, controllers, services, policies, and middlewares in Strapi. - [使用 JWT 的身份验证流程](https://strapi.nodejs.cn/cms/backend-customization/examples/authentication.md): 使用 JWT 验证 REST API 请求,通过将凭证发送到 /auth/local 端点并将令牌存储在 localStorage,可选的会话管理支持刷新令牌。 🌐 Authenticate REST API requests using JWT by sending credentials to the /auth/local endpoint and storing the token in localStorage, with optional session management for refresh token support. - [自定义中间件](https://strapi.nodejs.cn/cms/backend-customization/examples/middlewares.md): 自定义全局中间件在控制器执行之前拦截传入请求,使你能够添加诸如分析跟踪等逻辑。此示例创建了一个中间件,将餐厅页面访问记录到 Google 表格中。 🌐 Custom global middlewares intercept incoming requests before controller execution, enabling you to add logic like analytics tracking. This example creates a middleware that logs restaurant page visits to a Google Sheet. - [自定义策略](https://strapi.nodejs.cn/cms/backend-customization/examples/policies.md): 自定义策略通过允许或阻止请求来控制对内容类型端点的访问,并且可以使用 PolicyError 抛出自定义错误,以实现更好的错误处理和前端集成。 🌐 Custom policies control access to content-type endpoints by allowing or blocking requests, and can throw custom errors using PolicyError for better error handling and front-end integration. - [自定义路线](https://strapi.nodejs.cn/cms/backend-customization/examples/routes.md): 自定义路由让你可以明确配置内容类型的路由,以控制身份验证并应用策略,例如绕过默认的 Strapi 身份验证或根据自定义条件限制访问。 🌐 Custom routes let you explicitly configure routes for content-types to control authentication and apply policies, such as bypassing default Strapi authentication or restricting access based on custom conditions. - [自定义服务和控制器](https://strapi.nodejs.cn/cms/backend-customization/examples/services-and-controllers.md): 服务封装了可重用的业务逻辑,控制器调用这些服务来处理评论和电子邮件通知。本指南演示了如何使用文档服务 API 创建自定义服务,以及调用这些服务的自定义控制器。 🌐 Services encapsulate reusable business logic that controllers invoke to handle reviews and email notifications. This guide demonstrates creating custom services using the Document Service API and custom controllers that call them. - [自定义用户与权限插件路由](https://strapi.nodejs.cn/cms/backend-customization/guides/customizing-users-permissions-plugin-routes.md): 用户与权限 功能公开了 /users 和 /auth 路由,可以使用插件扩展系统进行扩展或覆盖。本指南展示了如何为用户集合添加自定义策略、覆盖控制器以及添加新路由。 - [中间件](https://strapi.nodejs.cn/cms/backend-customization/middlewares.md): 中间件在应用或 API 级别上改变请求或响应的流程。本文档区分了全局中间件与路由中间件,并通过生成模式展示了自定义实现方法。 - [模型](https://strapi.nodejs.cn/cms/backend-customization/models.md): 模型通过内容类型和可重用组件定义 Strapi 的内容结构。本指南将介绍如何在内容类型构建器或 CLI 中创建这些模型,以及如何使用可选的生命周期钩子管理模式文件。 - [政策](https://strapi.nodejs.cn/cms/backend-customization/policies.md): 策略在控制器之前执行,以对路由执行授权或其他检查。本文档中的说明涵盖了生成全局或特定范围的策略以及将它们连接到路由配置中。 - [请求与响应](https://strapi.nodejs.cn/cms/backend-customization/requests-responses.md): Koa 的上下文(ctx)在每个 Strapi 端点中携带请求信息、状态和响应数据。本文档详细说明了 ctx.request、ctx.state 和 ctx.response,以及用于在任何地方访问上下文的辅助工具。 - [路线](https://strapi.nodejs.cn/cms/backend-customization/routes.md): 路由将传入的 URL 映射到控制器,并为每种内容类型预生成页面。本文档展示了如何添加或自定义核心和自定义路由,并附加策略或中间件以实现额外控制。 - [服务](https://strapi.nodejs.cn/cms/backend-customization/services.md): 服务存储可重用的函数,以保持控制器简洁并遵循 DRY 原则。本文件说明了如何使用 createCoreService 生成或扩展服务,以及如何为 API 或插件组织它们。 - [网络钩子](https://strapi.nodejs.cn/cms/backend-customization/webhooks.md): Webhooks 让 Strapi 在内容发生变化时通知外部系统,同时为了隐私省略 Users 类型。在 config/server 中的配置设置了默认的头信息和触发第三方处理的端点。 - [账单门户](https://strapi.nodejs.cn/cms/billing-portal.md): Strapi 账单门户是你可以查看所有 Strapi 订阅以及管理付款方式、账单详细信息和发票的地方。只有 Growth 订阅可以在门户中管理;Cloud 和 Enterprise 订阅仅可查看。 - [命令行接口](https://strapi.nodejs.cn/cms/cli.md): Strapi 带有功能齐全的命令行接口(CLI),使你可以在几秒钟内搭建和管理项目。CLI 可与 yarn 和 npm 包管理器一起使用。 🌐 Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds. The CLI works with both the yarn and npm package managers. - [社区与支持 {#community--support}](https://strapi.nodejs.cn/cms/community.md): Strapi 是一个开源、面向社区的项目,欢迎对核心、文档和设计系统做出贡献。可以通过 GitHub 讨论和 Discord 免费获得支持,或者通过有效的付费计划访问支持平台。 🌐 Strapi is an open-source, community-oriented project welcoming contributions to the core, documentation, and design system. Get support through GitHub Discussions and Discord for free, or access the Support platform with an active paid plan. - [配置](https://strapi.nodejs.cn/cms/configurations.md): Strapi 应用通过 /config 文件夹中的文件进行配置,包括数据库、服务器、管理面板、中间件和 API 的必需基础配置,以及插件、TypeScript、API 令牌、生命周期函数、定时任务和环境变量的可选配置。 🌐 Strapi applications are configured through files in the /config folder, including required base configurations for database, server, admin panel, middlewares, and API, plus optional configurations for plugins, TypeScript, API tokens, lifecycle functions, cron jobs, and environment variables. - [管理面板配置](https://strapi.nodejs.cn/cms/configurations/admin-panel.md): /config/admin中的选项允许你调整管理员面板的行为和服务器设置,包括自定义URL、主机和端口。 - [API 调用配置](https://strapi.nodejs.cn/cms/configurations/api.md): /config/api 集中管理响应隐私、REST 默认设置(前缀、分页限制、最大请求大小)以及对 REST 内容 API 和文档服务的严格参数验证。 - [CRON 任务](https://strapi.nodejs.cn/cms/configurations/cron.md): Cron 作业通过 node-schedule 在特定时间安排自定义函数,通过服务器配置和可选任务文件激活。 - [数据库配置](https://strapi.nodejs.cn/cms/configurations/database.md): /config/database 定义了对 SQLite、MySQL 和 PostgreSQL 等支持的数据库的连接、客户端和连接池。 - [创建自定义电子邮件提供商](https://strapi.nodejs.cn/cms/configurations/email-custom-providers.md): 通过导出一个带有 send() 函数的 Node.js 模块来构建自定义电子邮件提供程序。可以在项目中本地使用,也可以发布到 npm 与社区共享。 - [高级 Nodemailer 配置](https://strapi.nodejs.cn/cms/configurations/email-nodemailer.md): Nodemailer 提供程序支持 OAuth2 认证、连接池、DKIM 签名和速率限制。每种场景在标准 SMTP 配置的基础上向 providerOptions 添加特定的键。 - [环境变量配置](https://strapi.nodejs.cn/cms/configurations/environment.md): Strapi 特定的环境变量和 .env usage 启用每个环境的配置,并且提供 env() 辅助工具来转换值。 - [功能配置](https://strapi.nodejs.cn/cms/configurations/features.md): /config/features 中的未来标志用于切换 Strapi 的实验性功能,允许你自行承担风险进行早期测试。 - [生命周期函数](https://strapi.nodejs.cn/cms/configurations/functions.md): src/index 托管全局注册、引导和销毁函数,以在应用生命周期中运行逻辑。 - [访问并转换环境变量](https://strapi.nodejs.cn/cms/configurations/guides/access-cast-environment-variables.md): env() 工具从 .env 文件访问环境变量,并将它们转换为不同的类型,包括 int、float、bool、json、array、date 和 oneOf。 🌐 The env() utility accesses environment variables from .env files and casts them to different types including int, float, bool, json, array, date, and oneOf. - [访问配置值](https://strapi.nodejs.cn/cms/configurations/guides/access-configuration-values.md): 使用 strapi.config.get() 方法访问启动时加载的配置值,并对所有配置文件中的嵌套键使用点符号表示法。 🌐 Access configuration values loaded on startup using the strapi.config.get() method with dot notation for nested keys across all configuration files. - [单点登录配置](https://strapi.nodejs.cn/cms/configurations/guides/configure-sso.md): 在 Strapi 管理面板中配置 SSO 提供商,通过注册 OAuth/OIDC 应用、将凭据添加到 /config/admin 中的 auth.providers,并设置回调 URL 以启用额外的登录方式。 🌐 Configure SSO providers in the Strapi admin panel by registering OAuth/OIDC applications, adding credentials to auth.providers in /config/admin, and setting up callback URLs to enable additional sign-in methods. - [创建新的基于角色的访问控制(RBAC)条件](https://strapi.nodejs.cn/cms/configurations/guides/rbac.md): 使用 conditionProvider API 在 Strapi 中创建自定义基于角色的访问控制 (RBAC) 条件,以根据用户属性、实体查询或外部条件限制管理面板访问。 🌐 Create custom Role-Based Access Control (RBAC) conditions in Strapi using the conditionProvider API to restrict admin panel access based on user properties, entity queries, or external conditions. - [媒体库提供商](https://strapi.nodejs.cn/cms/configurations/media-library-providers.md): 媒体库提供商扩展了 Strapi 的上传功能,以将文件存储在像 AWS S3 或 Cloudinary 这样的外部服务中。你可以安装官方提供商,在 /config/plugins 中配置它们,创建自定义提供商,或使用带签名 URL 的私有提供商来安全访问资源。 🌐 Media Library providers extend Strapi's upload capabilities to store files in external services like AWS S3 or Cloudinary. You can install official providers, configure them in /config/plugins, create custom providers, or set up private providers with signed URLs for secure asset access. - [亚马逊 S3 提供商](https://strapi.nodejs.cn/cms/configurations/media-library-providers/amazon-s3.md): @strapi/provider-upload-aws-s3 包允许你将媒体库资源存储在 Amazon S3 或任何兼容 S3 的服务上(如 Cloudflare R2、Scaleway、MinIO 等)。本页面涵盖了提供商配置、必要的 AWS 设置(IAM、CORS、中间件)以及扩展选项,如加密、校验和以及用于私有存储桶的签名 URL。 🌐 The @strapi/provider-upload-aws-s3 package lets you store Media Library assets on Amazon S3 or any S3-compatible service (Cloudflare R2, Scaleway, MinIO, etc.). This page covers provider configuration, required AWS setup (IAM, CORS, middleware), and extended options such as encryption, checksums, and signed URLs for private buckets. - [Cloudinary 提供商](https://strapi.nodejs.cn/cms/configurations/media-library-providers/cloudinary.md): @strapi/provider-upload-cloudinary 包允许你将媒体库资源存储在 上。本页介绍使用你的 Cloudinary 云名称、API 密钥和 API 密码进行的安装和配置。 - [本地上传提供商](https://strapi.nodejs.cn/cms/configurations/media-library-providers/local-upload.md): @strapi/provider-upload-local 包允许你将媒体库资源存储在本地服务器文件系统上。本页涵盖安装和配置,包括可选的 sizeLimit 参数,用于控制最大上传文件大小。 🌐 The @strapi/provider-upload-local package lets you store Media Library assets on the local server file system. This page covers installation and configuration, including the optional sizeLimit parameter to control the maximum upload file size. - [中间件配置](https://strapi.nodejs.cn/cms/configurations/middlewares.md): /config/middlewares 下达全局中间件,启用自定义名称或解析,并公开内置配置选项。 - [插件配置](https://strapi.nodejs.cn/cms/configurations/plugins.md): /config/plugins 启用或禁用插件并覆盖其设置,并提供用于本地插件开发的示例。 - [服务器配置](https://strapi.nodejs.cn/cms/configurations/server.md): /config/server 管理主机、端口、URL、代理、定时任务等;更改需要重新构建管理面板。 - [Discord 单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/discord.md): Discord SSO 提供商允许用户通过他们的 Discord 账户登录和注册 Strapi。在 config/admin 中使用带有客户端凭证和电子邮件权限的 passport-discord 配置它。 🌐 Discord SSO provider enables users to sign in and sign up to Strapi through their Discord account. Configure it in config/admin using passport-discord with client credentials and email scope. - [GitHub 单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/github.md): 使用你的 GitHub OAuth 凭据和用户电子邮件权限,在 config/admin 文件中通过 passport-github2 将 GitHub 配置为 Strapi 管理员登录的 SSO 提供者。 🌐 Configure GitHub as an SSO provider for Strapi admin sign-in using passport-github2 in the config/admin file with your GitHub OAuth credentials and user email scope. - [谷歌单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/google.md): 在你的 Strapi 管理面板中将 Google 配置为 SSO 提供商,以允许用户使用其 Google 账户凭据登录和注册。 🌐 Configure Google as an SSO provider in your Strapi admin panel to allow users to sign in and sign up using their Google account credentials. - [Keycloak 单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/keycloak.md): Keycloak 是一个 OpenID Connect 单点登录提供程序,允许用户通过在 config/admin 中配置的 passport-keycloak-oauth2-oidc 策略使用 Keycloak 身份验证登录 Strapi。 🌐 Keycloak is an OpenID Connect SSO provider that lets users sign in to Strapi through Keycloak authentication using the passport-keycloak-oauth2-oidc strategy configured in config/admin. - [微软单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/microsoft.md): 使用 passport-azure-ad-oauth2 配置 Microsoft SSO 提供程序,以允许用户通过他们的 Microsoft 账户登录和注册你的 Strapi 管理面板。 🌐 Configure the Microsoft SSO provider using passport-azure-ad-oauth2 to allow users to sign in and sign up to your Strapi admin panel via their Microsoft accounts. - [Okta 单点登录提供商](https://strapi.nodejs.cn/cms/configurations/sso-providers/okta.md): Okta 是一个单点登录(SSO)提供商,允许用户通过其 Okta 账户使用在 auth.providers 数组中配置的 OAuth2 凭据登录和注册 Strapi。 🌐 Okta is an SSO provider that allows users to sign in and sign up to Strapi through their Okta account using OAuth2 credentials configured in the auth.providers array. - [TypeScript 配置](https://strapi.nodejs.cn/cms/configurations/typescript.md): TypeScript 配置说明了项目的 tsconfig 文件、输出目录以及一个可选的 config/typescript.js|ts,该选项可以在服务器重启时自动生成类型。本文档解释了哪些文件夹存储已编译的代码以及如何切换此实验性功能。 - [用户与权限提供者](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers.md): 为 Strapi 的用户与权限认证功能配置 OAuth 和 OAuth2 提供者,提供常用提供者(如 GitHub、Google 和 Auth0)的设置指南,以及创建自定义提供者的说明。 🌐 Configure OAuth and OAuth2 providers for Strapi's Users & Permissions authentication feature, with setup guides for common providers like GitHub, Google, and Auth0, plus instructions for creating custom providers. - [为用户和权限设置 Auth0 提供程序](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/auth-zero.md): Auth0 提供程序设置为用户与权限功能启用 OAuth 2.0 身份验证,需要在 Auth0 租户和 Strapi 管理设置中使用客户端 ID、客户端密钥和子域凭据进行配置。 🌐 Auth0 provider setup enables OAuth 2.0 authentication for the Users & Permissions feature, requiring configuration in both Auth0 tenant and Strapi admin settings using Client ID, Client Secret, and subdomain credentials. - [AWS Cognito 用户与权限提供者设置](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/aws-cognito.md): AWS Cognito 提供程序允许你通过在 AWS 中配置用户池,并将客户端凭证和域添加到 Strapi 的提供程序设置中,为用户和权限设置 OAuth 2.0 认证。 🌐 AWS Cognito provider lets you set up OAuth 2.0 authentication for Users & Permissions by configuring a user pool in AWS and adding the client credentials and domain to Strapi's provider settings. - [用户与权限的 CAS 提供商设置](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/cas.md): CAS 是一个 SSO 服务器,Strapi 在启用 OIDC 支持时可以使用它进行身份验证。在 Strapi 的“用户与权限”设置中配置 CAS 服务定义,并提供客户端 ID、密钥和提供者子域名。 🌐 CAS is an SSO server that Strapi can use for authentication when deployed with OIDC support. Configure a CAS service definition and provide the client ID, secret, and provider subdomain in Strapi's Users & Permissions settings. - [Discord 提供者设置用于用户和权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/discord.md): Discord 提供者设置允许你通过在 Strapi 的用户与权限提供者设置中配置你的 Discord 应用凭证,使用 Discord OAuth2 进行用户身份验证。 🌐 Discord provider setup allows you to authenticate users via Discord OAuth2 by configuring your Discord app credentials in Strapi's Users & Permissions provider settings. - [Facebook 提供者设置用于用户与权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/facebook.md): Facebook 提供程序设置使 Strapi 的用户与权限功能支持社交登录认证。配置一个具有 OAuth 凭据的 Facebook 应用,并更新 Strapi 设置,以使用你的客户端 ID、客户端密钥和前端重定向 URL 启用该提供程序。 🌐 Facebook provider setup enables social login authentication in Strapi's Users & Permissions feature. Configure a Facebook app with OAuth credentials and update Strapi settings to enable the provider with your Client ID, Client Secret, and frontend redirect URL. - [GitHub 提供程序设置用于用户和权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/github.md): GitHub 提供程序设置为 Strapi 的用户与权限功能启用 OAuth 身份验证,需要配置 GitHub OAuth 应用和 Strapi 提供程序设置。 🌐 GitHub provider setup enables OAuth authentication for Strapi's Users & Permissions feature, requiring GitHub OAuth app configuration and Strapi provider settings. - [用户和权限的 Google 提供商设置](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/google.md): 通过在 Google 开发者控制台创建凭据并将其添加到提供程序设置,为 Strapi 用户和权限配置 Google OAuth 身份验证。 🌐 Configure Google OAuth authentication for Strapi Users & Permissions by creating credentials in Google Developer Console and adding them to the provider settings. - [Instagram 提供者设置用于用户与权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/instagram.md): Instagram 基础显示 API 自 2024 年 12 月 4 日起已被弃用。Strapi 内置的 Instagram 提供程序不再可用,需要更新为 Meta 的 Instagram 商业登录 API。 🌐 The Instagram Basic Display API is deprecated as of December 4, 2024. Strapi's built-in Instagram provider no longer works and requires updating to Meta's Instagram Business Login API instead. - [Keycloak 用户和权限提供程序设置](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/keycloak.md): 通过在 Keycloak 中配置客户端,然后在 Strapi 的管理员设置中启用并填写 Keycloak 提供程序详细信息,将 Keycloak 设置为 Strapi 用户与权限功能的身份提供者。 🌐 Set up Keycloak as an identity provider for Strapi's Users & Permissions feature by configuring a client in Keycloak, then enabling and filling in the Keycloak provider details in Strapi's admin settings. - [为用户和权限设置 LinkedIn 提供程序](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/linkedin.md): 通过创建 LinkedIn 应用、注册重定向 URL,并在 Strapi 管理面板中输入你的凭据,将 LinkedIn 配置为 Strapi 的用户与权限功能的提供者。 🌐 Configure LinkedIn as a provider for Strapi's Users & Permissions feature by creating a LinkedIn app, registering the redirect URL, and entering your credentials in the Strapi admin panel. - [创建并添加自定义的用户与权限提供程序](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/new-provider-guide.md): 通过在 src/index.js 中注册自定义 OAuth 提供程序,并实现一个返回用户 email 和 username 的 authCallback,为 Strapi 的用户与权限功能创建自定义 OAuth 提供程序,以便自动注册或登录。 🌐 Create custom OAuth providers for Strapi's Users & Permissions feature by registering them in src/index.js and implementing an authCallback that returns user email and username for automatic registration or login. - [Patreon 提供者设置用于用户和权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/patreon.md): 通过在 Patreon 上注册 OAuth 客户端,并在 Strapi 中使用你的客户端 ID 和客户端密钥进行配置,将 Patreon 设置为用户和权限的 OAuth 提供商。 🌐 Set up Patreon as an OAuth provider for Users & Permissions by registering an OAuth client on Patreon and configuring it in Strapi with your Client ID and Client Secret. - [Reddit 提供者设置用于用户和权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/reddit.md): 通过创建 Reddit 应用并在 Strapi 的提供程序设置中输入客户端 ID 和密钥,为用户和权限配置 Reddit 提供程序。 🌐 Configure the Reddit provider for Users & Permissions by creating a Reddit app and inputting the Client ID and Secret in Strapi's provider settings. - [Twitch 提供者设置用于用户和权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/twitch.md): 通过在 Twitch 开发者控制台注册你的应用并将你的凭据添加到 Strapi 的提供程序设置中,为 Strapi 的用户与权限功能配置 Twitch OAuth 身份验证。 🌐 Configure Twitch OAuth authentication for Strapi's Users & Permissions feature by registering your application on the Twitch developer console and adding your credentials to Strapi's provider settings. - [Twitter 提供者设置用于用户与权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/twitter.md): 将 Twitter(现为 X)配置为用户与权限的 OAuth 提供程序。由于 v1.1 API 端点不再免费提供,因此需要付费的 X 开发者门户计划。 🌐 Configure Twitter (now X) as an OAuth provider for Users & Permissions. Requires a paid X Developer Portal plan since the v1.1 API endpoint is no longer freely available. - [VK 提供商设置用于用户与权限](https://strapi.nodejs.cn/cms/configurations/users-and-permissions-providers/vk.md): 为用户和权限设置的 VK 提供程序启用通过 VK 的身份验证。配置 VK 应用,然后在 Strapi 的提供程序设置中设置客户端 ID、密钥和重定向 URL,以启用 VK 登录。 🌐 VK provider setup for Users & Permissions enables authentication via VK. Configure a VK app, then set the client ID, secret, and redirect URL in Strapi's provider settings to enable VK login. - [自定义](https://strapi.nodejs.cn/cms/customization.md): Strapi 包含一个后端服务器和管理面板,两者都可以自定义以扩展功能,如路由、策略、中间件、主题等。 🌐 Strapi contains a backend server and admin panel, both of which can be customized to extend functionality like routes, policies, middlewares, themes, and more. - [数据导出](https://strapi.nodejs.cn/cms/data-management/export.md): strapi export 命令将数据从 Strapi 实例导出为一个加密和压缩的归档文件,其中包含实体、关系、资源、模式和配置。可以使用 --no-encrypt、--no-compress、--only 和 --exclude 等选项自定义导出。 🌐 The strapi export command exports data from a Strapi instance as an encrypted and compressed archive containing entities, relations, assets, schemas, and configuration. Customize exports using options like --no-encrypt, --no-compress, --only, and --exclude. - [数据导入](https://strapi.nodejs.cn/cms/data-management/import.md): strapi import 命令用于从加密或压缩的存档中恢复项目数据,包括内容、配置、文件和模式。它支持从 .tar.gz.enc 文件或解压目录导入,并提供排除或包含特定数据类型的选项。 🌐 The strapi import command restores project data from an encrypted or compressed archive, including content, configuration, files, and schemas. It supports importing from .tar.gz.enc files or unpacked directories, with options to exclude or include specific data types. - [数据传输](https://strapi.nodejs.cn/cms/data-management/transfer.md): strapi transfer 命令在两个具有相同模式的 Strapi 实例之间传输数据,使用传输令牌进行授权和身份验证,从而传输内容、文件和配置。 🌐 The strapi transfer command streams data between two Strapi instances with identical schemas, transferring content, files, and configuration using transfer tokens for authorization and authentication. - [数据库迁移](https://strapi.nodejs.cn/cms/database-migrations.md): 数据库迁移在模式同步之前运行一次性脚本,以在升级过程中保留数据。实验性 API 使用按字母顺序排列的 up() 文件,并会警告缺少向下迁移和可能的表删除。 - [数据库事务](https://strapi.nodejs.cn/cms/database-transactions.md): 数据库事务将多个操作组合在一起,使它们作为一个整体成功或回滚。实验性的 strapi.db.transaction 辅助工具提供 trx、提交和回滚功能,用于封装的服务调用。 - [部署](https://strapi.nodejs.cn/cms/deployment.md): 部署选项包括硬件/软件先决条件、环境变量设置以及在启动前构建管理面板。在文档中:提供了针对特定提供商的指南和高级指南的链接,以帮助选择合适的托管策略。 - [错误处理](https://strapi.nodejs.cn/cms/error-handling.md): Strapi 的 API 会以一致的结构返回错误,并允许后端代码为控制器、服务、策略或生命周期抛出自定义异常。本档文档列出了错误类、上下文助手以及编写有意义响应的示例。 - [常见问题](https://strapi.nodejs.cn/cms/faq.md): 常见问题解答,涵盖常见的 Strapi 主题,包括内容类型管理、部署、身份验证、数据库处理、无服务器限制、插件、Docker、SSL 配置、TypeScript 支持和功能可用性。 🌐 Frequently asked questions covering common Strapi topics including content-type management, deployment, authentication, database handling, serverless limitations, plugins, Docker, SSL configuration, TypeScript support, and feature availability. - [管理面板](https://strapi.nodejs.cn/cms/features/admin-panel.md): 管理面板作为 Strapi 的后台,用于管理内容类型、条目以及管理员和终端用户账户。本文件概述了管理面板的功能,然后重点介绍了用于管理界面语言和模式、登录和个人信息以及用于品牌标识的徽标的个人资料设置。 - [管理员令牌](https://strapi.nodejs.cn/cms/features/admin-tokens.md): 管理员令牌用于验证对 Strapi 管理 API 的程序化访问。每个令牌的权限范围是其所有者权限的一个子集,并设计用于自动化工作流程,例如 MCP 代理、CI/CD 管道和脚本。 - [API 令牌](https://strapi.nodejs.cn/cms/features/api-tokens.md): API 令牌用于在不暴露用户凭据的情况下验证对 Strapi 内容 API 的外部请求。每个令牌都限定在一组权限范围内,并在可配置的时间后过期。 - [审计日志](https://strapi.nodejs.cn/cms/features/audit-logs.md): 审计日志捕获每一个可搜索、可过滤历史记录中的管理操作,以帮助排除故障和合规。在本指南中,示例展示了如何查看数据内容以及按用户或日期进行过滤。 - [内容历史](https://strapi.nodejs.cn/cms/features/content-history.md): 内容历史记录存储以前的文档版本,编辑可以通过内容管理器比较并恢复早期状态。本档说明文档解释了如何浏览和恢复工作流,以便快速回滚错误。 - [内容管理](https://strapi.nodejs.cn/cms/features/content-manager.md): 内容管理器是 Strapi 用于浏览和编辑条目的界面。本档提供了内容管理器的概述,并解释了视图以及如何在字段、组件、动态区域和关联字段中编写内容。 - [内容类型构建器](https://strapi.nodejs.cn/cms/features/content-type-builder.md): 内容类型构建器是用于设计内容类型和组件的工具。本指南概述了内容类型构建器,并涵盖字段选项、关联关系、组件使用,以及分享数据建模技巧。 - [自定义字段](https://strapi.nodejs.cn/cms/features/custom-fields.md): 自定义字段通过新的字段类型扩展 Strapi,这些字段在内容类型构建器和内容管理器中表现得像原生字段。本文档中的说明涵盖了通过插件构建或安装字段以及以编程方式注册字段的步骤。 - [数据管理](https://strapi.nodejs.cn/cms/features/data-management.md): 数据管理处理基于 CLI 的内容导入、导出以及在 Strapi 实例之间的传输,同时在管理面板中进行部分配置。本文件中解释的逐步命令和前提设置可确保迁移安全。 - [草稿与发布](https://strapi.nodejs.cn/cms/features/draft-and-publish.md): 草稿与发布将草稿与已发布条目分开,让编辑可以在发布前进行内容准备。本文档展示了如何按内容类型启用该功能,以及如何管理发布或取消发布操作。 - [电子邮件](https://strapi.nodejs.cn/cms/features/email.md): 电子邮件功能通过本地 SMTP 或外部提供商(如 SendGrid)发送事务信息。本文档中的设置指南涵盖提供商配置以及通过控制器或钩子扩展发送方式。 - [国际化](https://strapi.nodejs.cn/cms/features/internationalization.md): 国际化可以直接从管理面板管理多个地区的内容。本指南解释了如何添加地区、翻译条目以及控制特定地区的权限。 - [媒体库](https://strapi.nodejs.cn/cms/features/media-library.md): 媒体库集中管理所有上传的资源,提供搜索、过滤和文件夹组织功能。本说明文档包括供应商选项、上传工作流程,以及在内容中插入媒体的说明。 - [预览](https://strapi.nodejs.cn/cms/features/preview.md): 预览将内容管理器连接到前端,以便编辑人员在发布之前查看更改。在本指南中:配置预览 URL 的步骤。 - [基于角色的访问控制(RBAC)](https://strapi.nodejs.cn/cms/features/rbac.md): 基于角色的访问控制(RBAC)管理管理员角色和管理面板中的细粒度权限。本文件涵盖创建角色、分配权限以及保护管理工作流程。 - [发布](https://strapi.nodejs.cn/cms/features/releases.md): 将组条目发布到可发布的批次中,以触发跨内容类型和地区的同时发布或取消发布操作。本文档中的说明详细介绍了创建发布、添加条目以及了解计划限制的内容。 - [审查工作流程](https://strapi.nodejs.cn/cms/features/review-workflows.md): 审查工作流定义了用于内容审查的自定义多阶段流程,促进从草稿到发布的协作。本文档演示了如何创建工作流和分配阶段。 - [单点登录 (SSO)](https://strapi.nodejs.cn/cms/features/sso.md): 单点登录(SSO)允许管理员通过身份提供者(如 Azure AD)进行身份验证,而不是使用本地密码。本指南的配置步骤涵盖了启用 SSO 和映射角色。 - [MCP 服务器](https://strapi.nodejs.cn/cms/features/strapi-mcp-server.md): Strapi 包含一个内置的 模型上下文协议 (MCP) 服务器。一旦启用,它允许 AI 客户端通过 Strapi 的内容管理器直接创建、读取、更新、删除、发布和取消发布内容。所有操作都受管理员令牌权限的控制。 🌐 Strapi includes a built-in Model Context Protocol (MCP) server. Once enabled, it lets AI clients create, read, update, delete, publish, and unpublish content directly through Strapi's Content Manager. All operations are gated by Admin token permissions. - [用户与权限](https://strapi.nodejs.cn/cms/features/users-permissions.md): 用户与权限管理终端用户账户、基于JWT的身份验证以及基于角色的API访问权限。本文档解释了如何创建角色、配置权限以及保护对内容API的访问。 - [用户与权限 GraphQL API](https://strapi.nodejs.cn/cms/features/users-permissions/graphql-api.md): “用户与权限”功能提供用于身份验证、用户管理和基于角色的访问的 GraphQL 查询和变更。 - [用户与权限 REST API](https://strapi.nodejs.cn/cms/features/users-permissions/rest-api.md): “用户与权限”功能提供用于身份验证、用户管理、角色和权限的 REST API 端点。 - [设置管理面板](https://strapi.nodejs.cn/cms/getting-started/setting-up-admin-panel.md): 管理面板是你管理内容类型、内容和用户的地方。通过应用 URL 访问它,可选择使用 SSO,然后配置你的管理员资料,包括名称、电子邮件、语言和密码。 🌐 The admin panel is where you manage content-types, content, and users. Access it via the app URL, optionally using SSO, then configure your administrator profile including name, email, language, and password. - [安装](https://strapi.nodejs.cn/cms/installation.md): Strapi 项目可以通过 CLI 在本地安装,或在 Docker 容器中运行,用于开发和生产环境。 🌐 Strapi projects can be installed locally via CLI or run in Docker containers for development and production. - [命令行接口](https://strapi.nodejs.cn/cms/installation/cli.md): Strapi CLI 是使用 npx create-strapi@latest 在本地安装 Strapi 的最快方式,并且可以通过命令行选项配置 TypeScript、数据库(--dbclient、--dbhost 等)以及其他安装偏好设置。 🌐 The Strapi CLI is the fastest way to install Strapi locally using npx create-strapi@latest, with options to configure TypeScript, databases (--dbclient, --dbhost, etc.), and other setup preferences via command-line flags. - [Docker](https://strapi.nodejs.cn/cms/installation/docker.md): 本页面将指导你在开发和生产环境中使用 Docker 容器运行 Strapi,包括 Dockerfile 示例、Docker Compose 配置以及常见问题的排查方法。 - [欢迎使用 Strapi CMS 文档! {#welcome-to-the-strapi-cms-documentation}](https://strapi.nodejs.cn/cms/intro.md): Strapi 5 是一个开源的无头 CMS,开发者可以通过可扩展的管理面板构建自定义应用并管理内容,该面板内置基于角色的访问控制。 🌐 Strapi 5 is an open-source headless CMS where developers can build custom applications and manage content through an extensible admin panel with built-in role-based access control. - [从实体服务 API 到文档服务 API](https://strapi.nodejs.cn/cms/migration/v4-to-v5/additional-resources/from-entity-service-to-document-service.md): 文档服务 API 在 Strapi 5 中取代了实体服务 API。升级工具的代码修改(codemod)会自动转换函数调用和 publicationState 到 status,但 documentId 的值以及像 publish() 和 unpublish() 这样的发布方法仍需手动干预。 🌐 The Document Service API replaces the Entity Service API in Strapi 5. The upgrade tool's codemod automatically converts function calls and publicationState to status, but manual intervention is required for documentId values and publication methods like publish() and unpublish(). - [辅助插件迁移参考](https://strapi.nodejs.cn/cms/migration/v4-to-v5/additional-resources/helper-plugin.md): 参考指南,列出了已弃用的 helper-plugin 包中的每个导出,并提供迁移到 @strapi/strapi/admin、@strapi/design-system 及其他包中的替代组件和工具的路径。 🌐 Reference guide listing every export from the deprecated helper-plugin package with migration paths to replacement components and utilities in @strapi/strapi/admin, @strapi/design-system, and other packages. - [迁移到 Strapi 5 的额外资源](https://strapi.nodejs.cn/cms/migration/v4-to-v5/additional-resources/introduction.md): 附加资源提供了关于特定 Strapi 5 迁移主题的专门指导,包括从实体服务 API 迁移到文档服务 API、插件升级以及处理设计系统 v2 的重大变更。 🌐 Additional resources provide dedicated guidance on specific Strapi 5 migration topics, including transitioning from the Entity Service API to Document Service API, upgrading plugins, and handling Design System v2 breaking changes. - [插件升级摘要](https://strapi.nodejs.cn/cms/migration/v4-to-v5/additional-resources/plugins-migration.md): 从 Strapi v4 升级到 Strapi 5 的插件开发者必须迁移到插件 SDK,从实体服务 API 过渡到文档服务 API,更新前端代码以使用设计系统 v2,并移除 helper-plugin 依赖。 🌐 Plugin developers upgrading from Strapi v4 to Strapi 5 must migrate to the Plugin SDK, transition from the Entity Service API to the Document Service API, update front-end code to use Design System v2 and remove helper-plugin dependencies. - [重大变更](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes.md): Strapi v4 与 v5 之间重大变更的全面索引,按类别(数据库、依赖、配置、API)组织,包含关于插件影响和代码迁移工具支持的信息。 🌐 A comprehensive index of breaking changes between Strapi v4 and v5, organized by category (database, dependencies, configuration, APIs) with information on plugin impact and codemod support. - [管理员面板的 RBAC 系统已更新](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/admin-panel-rbac-store-updated.md): Strapi 5 移除了 content-managerrbacManager redux 存储部分,并改为使用带有更新 useRBAC 钩子的常规权限系统。 🌐 Strapi 5 removes the content-managerrbacManager redux store section and uses the regular permissions system with an updated useRBAC hook instead. - [保留的属性和内容类型名称](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/attributes-and-content-types-names-reserved.md): 在 Strapi 5 中,某些属性名称如 meta、status、entryId 以及任何以 strapi 为前缀的名称现在是保留的,不能使用。在 v4 中使用这些名称的字段和内容类型必须在迁移到 Strapi 5 之前重命名。 🌐 In Strapi 5, certain attribute names like meta, status, entryId, and anything prefixed with strapi are now reserved and cannot be used. Fields and content types using these names in v4 must be renamed before migrating to Strapi 5. - [组件和动态区域不会返回ID](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/components-and-dynamic-zones-do-not-return-id.md): 在 Strapi 5 中,组件和动态区域在 REST API 响应中不再返回 id,这阻止了部分更新,并要求必须发送完整的组件对象。 🌐 In Strapi 5, components and dynamic zones no longer return an id in REST API responses, preventing partial updates and requiring full component objects to be sent instead. - [核心服务方法使用文档服务 API](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/core-service-methods-use-document-service.md): 在 Strapi 5 中,核心服务方法使用文档服务 API(Document Service API)而不是实体服务 API(Entity Service API),像 findOne、update 和 delete 这样的方法接收的是 documentId 而不是 entityId。 🌐 In Strapi 5, core service methods use the Document Service API instead of the Entity Service API, with methods like findOne, update, and delete receiving a documentId instead of entityId. - [数据库列](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/database-columns.md): 在 Strapi 5 中,所有内容类型都会自动包含用于文档管理、发布和国际化的 documentid、publishedat 和 locale 数据库列。 🌐 In Strapi 5, all content types automatically include documentid, publishedat, and locale database columns for document management, publication, and internationalization. - [v5 中缩短的数据库标识符](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/database-identifiers-shortened.md): 在 Strapi v5 中,数据库标识符限制为 55 个字符;较长的标识符会自动使用哈希后缀缩短以防止冲突。 🌐 Database identifiers are limited to 55 characters in Strapi v5; longer identifiers are automatically shortened with a hash suffix to prevent conflicts. - [defaultIndex 已移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/default-index-removed.md): 在 Strapi 5 中,public 中间件的 defaultIndex 选项已被移除,根 / URL 会在连接时自动重定向到管理员面板登录页或首页。 🌐 In Strapi 5, the defaultIndex option is removed from the public middleware, and the root / URL automatically redirects to the admin panel login or homepage if connected. - [REST API 输入默认在控制器中进行验证](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/default-input-validation.md): 在 Strapi 5 中,REST API 的输入默认在控制器中进行验证,而不是静默地进行清理,对于无效数据(如未识别的字段和不允许的关联)会抛出 400 Bad Request 错误。 🌐 In Strapi 5, REST API input is validated by default in controllers instead of being silently sanitized, throwing 400 Bad Request errors for invalid data like unrecognized fields and unpermitted relations. - [Strapi 5 中的设计系统更新](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/design-system.md): Strapi 设计系统在 Strapi 5 中已升级到 v2,包含导入结构、组件 API 和样式的更改,包括根导入、Radix-UI 迁移、新的 Field API 以及新的基础字体大小 62.5%。 🌐 The Strapi Design System has been upgraded to v2 in Strapi 5 with changes to import structure, component APIs, and styling, including root imports, Radix-UI migrations, a new Field API, and a new base font-size of 62.5%. - [defaultIndex 已移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/do-not-update-repeatable-components-with-document-service-api.md): 在 Strapi 5 中,不建议使用 Document Service API 更新可重复组件,因为草稿和已发布的组件具有不同的 ID,从而导致无法使用 documentId 成功更新。 🌐 In Strapi 5, updating repeatable components with the Document Service API is not recommended because draft and published components have different IDs, preventing successful updates using documentId. - [组件 `EditViewLayout` 和 `ListViewLayout` 已被重写](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/edit-view-layout-and-list-view-layout-rewritten.md): 在 Strapi 5 中,content-managereditViewLayoutManager 和 content-managerlistViewLayoutManager Redux 钩子已被移除,并被用于管理面板自定义的新 useDocumentLayout 钩子所取代。 🌐 In Strapi 5, the content-managereditViewLayoutManager and content-managerlistViewLayoutManager Redux hooks have been removed and replaced with a new useDocumentLayout hook for admin panel customization. - [实体服务已弃用](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/entity-service-deprecated.md): 在 Strapi 5 中,实体服务 API 已被弃用,并由文档服务 API 取代,该 API 使用 documentId,对所有查询返回数组,并引入了用于草稿和发布工作流程的新方法。 🌐 The Entity Service API is deprecated in Strapi 5 and replaced by the Document Service API, which uses documentId, returns arrays for all queries, and introduces new methods for draft and publish workflows. - [strapi.fetch 使用原生 fetch() API](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/fetch.md): 在 Strapi 5 中,strapi.fetch 封装了原生的 fetch() API,而不是 node-fetch,因此需要将 timeout 参数替换为 signal: AbortSignal.timeout()。 🌐 In Strapi 5, strapi.fetch wraps the native fetch() API instead of node-fetch, requiring the timeout parameter to be replaced with signal: AbortSignal.timeout(). - [权限提供者实例的 getWhere() 方法已被移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/get-where-removed.md): 在 Strapi 5 中,权限提供者实例的 getWhere() 方法已被移除;请改用带有自定义谓词的 provider.values().filter() 来查询和匹配提供者项。 🌐 The getWhere() method for permission provider instances has been removed in Strapi 5; use provider.values().filter() with a custom predicate instead to query and match provider items. - [GraphQL API 已更新](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/graphql-api-updated.md): Strapi 5 GraphQL API 支持新的扁平化响应格式和用于分页的 Relay 风格 connection 查询。使用 v4CompatibilityMode 逐步迁移,采用 documentId,将字段重命名为 connection,并最终删除 attributes 封装器。 🌐 The Strapi 5 GraphQL API supports a new flattened response format and Relay-style connection queries for pagination. Migrate gradually using v4CompatibilityMode, adopt documentId, rename fields to connection, and eventually drop the attributes wrapper. - [helper-plugin 已移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/helper-plugin-deprecated.md): 在 Strapi 5 中,helper-plugin 已被移除,并由来自 @strapi/strapi/admin 和 @strapi/design-system 的导入替代。Codemods 自动处理插件开发者的大部分迁移更改。 🌐 In Strapi 5, the helper-plugin is removed and replaced with imports from @strapi/strapi/admin and @strapi/design-system. Codemods automatically handle most migration changes for plugin developers. - [国际化(i18n)现在已成为 Strapi 核心的一部分](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/i18n-content-manager-locale.md): 国际化(i18n)现在是 Strapi 核心的一部分,而不是插件。发送给内容管理器的 locale 参数在 v4 中从 plugins[i18n][locale] 变为 v5 中的 locale。 🌐 Internationalization (i18n) is now part of Strapi core instead of a plugin. The locale parameter sent to Content Manager changes from plugins[i18n][locale] in v4 to locale in v5. - [injectContentManagerComponent() 已移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/inject-content-manager-component.md): injectContentManagerComponent() 方法在 Strapi 5 中被移除,并被 getPlugin('content-manager').injectComponent() 替代,因为内容管理器现在是一个插件。 🌐 The injectContentManagerComponent() method is removed in Strapi 5 and replaced with getPlugin('content-manager').injectComponent() since the Content Manager is now a plugin. - [Strapi 5 中已移除 isSupportedImage 方法](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/is-supported-image-removed.md): isSupportedImage 方法在 Strapi 5 中已被移除。开发者必须改用 isImage 或 isOptimizableImage。 🌐 The isSupportedImage method is removed in Strapi 5. Developers must use isImage or isOptimizableImage instead. - [Strapi 5 使用 koa-body v6](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/koa-body-v6.md): Strapi 5 升级到 koa-body v6,配合 formidable v2,在自定义端点中将上传文件的属性从 path、name、type 改为 filepath、originalFilename、mimetype。 🌐 Strapi 5 upgrades to koa-body v6 with formidable v2, changing uploaded file properties from path, name, type to filepath, originalFilename, mimetype in custom endpoints. - [lockIcon 被 licenseOnly 替换](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/license-only.md): 在 Strapi 5 中,lockIcon 属性在管理面板 API 方法 addMenuLink()、addSettingsLink() 和 addSettingsLinks() 中被 licenseOnly 所取代,显示一个闪电图标以表示付费功能。 🌐 In Strapi 5, the lockIcon property is replaced by licenseOnly in the Admin Panel API methods addMenuLink(), addSettingsLink(), and addSettingsLinks(), displaying a lightning icon to indicate paid features. - [使用文档服务 API 方法时,数据库生命周期钩子的触发方式不同](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/lifecycle-hooks-document-service.md): 在 Strapi 5 中,当使用文档服务 API 方法时,数据库生命周期钩子的触发方式有所不同,这取决于操作类型和由于新的草稿与发布系统而导致的状态变化。 🌐 In Strapi 5, database lifecycle hooks are triggered differently when using Document Service API methods, varying by operation type and status changes due to the new Draft & Publish system. - [某些 Mailgun 提供商的旧变量不受支持](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/mailgun-provider-variables.md): 在 Strapi 5 中,遗留的 Mailgun 提供者变量 apiKey 和 host 不再受支持;请改用 key 和 url。 🌐 In Strapi 5, legacy Mailgun provider variables apiKey and host are no longer supported; use key and url instead. - [模型配置路径使用 uid 而不是点号表示法](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/model-config-path-uses-uid.md): 在 Strapi 5 中,配置路径使用 :: 表示法而不是点表示法来访问模型,将 plugin.upload.somesetting 改为 plugin::upload.somesetting。 🌐 In Strapi 5, configuration paths use :: notation instead of dot notation to access models, changing plugin.upload.somesetting to plugin::upload.somesetting. - [MySQL v5 不受支持](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/mysql5-unsupported.md): Strapi v5 不再支持 MySQL v5;现在最低要求的版本是 MySQL v8。请将你的 MySQL 数据库升级到 v8.0 以使用 Strapi v5。 🌐 MySQL v5 is no longer supported in Strapi v5; MySQL v8 is now the minimum required version. Upgrade your MySQL database to v8.0 to use Strapi v5. - [Strapi 5 对 API 调用有了新的扁平化响应格式](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/new-response-format.md): Strapi 5 通过移除 attributes 封装器并使用 documentId 替代 id 来扁平化 REST API 响应。在迁移期间使用 Strapi-Response-Format: v4 头以保持向后兼容性。 🌐 Strapi 5 flattens REST API responses by removing the attributes wrapper and using documentId instead of id. Use the Strapi-Response-Format: v4 header during migration for backward compatibility. - [文档服务 API 中没有 findPage()](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-find-page-in-document-service.md): Strapi 5 用 Document Service API 替代了 Entity Service API,后者不包含 findPage()。请改用 Document Service API 的 findMany() 方法。 🌐 Strapi 5 replaces the Entity Service API with the Document Service API, which does not include findPage(). Use the Document Service API's findMany() method instead. - [locale=all 不能用于查询所有语言环境](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-locale-all.md): 在 Strapi 5 中,locale=all 参数不再检索所有本地化版本;相反,必须单独请求特定的语言值。 🌐 In Strapi 5, the locale=all parameter no longer retrieves all localized versions; instead, specific locale values must be requested individually. - [组件和动态区域没有共享的人口策略](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-shared-population-strategy-components-dynamic-zones.md): 在 Strapi 5 中,组件和动态区域必须使用 on 片段显式填充,而不能使用 v4 支持的共享填充策略。 🌐 In Strapi 5, components and dynamic zones must be explicitly populated using on fragments instead of the shared population strategy supported in v4. - [在创建条目时不再支持上传文件](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-upload-at-entry-creation.md): 在 Strapi 5 中,创建条目时上传文件不再受支持。用户必须先通过上传 API 上传文件,然后使用文件 ID 创建条目。 🌐 In Strapi 5, uploading a file while creating an entry is no longer supported. Users must upload the file first via the Upload API, then create the entry with the file id. - [SQLite 客户端仅支持 `better-sqlite3` 包](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite.md): 在 Strapi 5 中,SQLite 数据库必须使用 better-sqlite3 包,并且数据库客户端配置设置为 sqlite,而不是其他选项如 sqlite3 或 sqlite-legacy。 🌐 In Strapi 5, SQLite databases must use the better-sqlite3 package with the database client configuration set to sqlite instead of other options like sqlite3 or sqlite-legacy. - [MySQL 客户端仅支持 mysql2 包](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/only-mysql2-package-for-mysql.md): Strapi 5 仅支持 MySQL 数据库的 mysql2 包,并且要求将 client 配置选项设置为 mysql。 🌐 Strapi 5 only supports the mysql2 package for MySQL databases and requires the client configuration option to be set to mysql. - [publicationState 已被移除并由 status 取代](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/publication-state-removed.md): 在 Strapi 5 中,publicationState 参数被 status 替代,它接受 draft 和 published 值,而不是 live 和 preview。 🌐 In Strapi 5, the publicationState parameter is replaced with status, which accepts draft and published values instead of live and preview. - [禁用草稿和发布的内容类型,其 publishedAt 值总是设置为某个日期](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/publishedat-always-set-when-dandp-disabled.md): 在 Strapi 5 中,禁用草稿和发布的内容类型总是将 publishedAt 属性设置为日期,而在 v4 中该属性不存在。 🌐 In Strapi 5, content-types with Draft & Publish disabled always have the publishedAt attribute set to a date, whereas in v4 the attribute did not exist. - [Strapi 5 使用 React Router DOM 6](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/react-router-dom-6.md): Strapi 5 升级到 react-router-dom v6,要求通过管理面板 API 添加的设置和菜单链接使用相对路径而不是绝对路径。 🌐 Strapi 5 upgrades to react-router-dom v6, requiring settings and menu links added via the Admin Panel API to use relative paths instead of absolute paths. - [ContentManagerAppState redux 已被修改](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/redux-content-manager-app-state.md): 在 Strapi 5 中,ContentManagerAppState redux 存储移除了 RESETINITDATA 和 GETINITDATA 操作,并且更改了 SETINITDATA 的负载结构,不再将属性嵌套在 data 对象内。 🌐 In Strapi 5, the ContentManagerAppState redux store removed RESETINITDATA and GETINITDATA actions, and changed SETINITDATA payload structure to no longer nest attributes within a data object. - [Users & Permissions 插件的 register.allowedFields 配置选项默认为 []](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/register-allowed-fields.md): 在 Strapi 5 中,用户与权限插件的 register.allowedFields 默认为空数组,需要显式允许字段,而不是默认接受所有字段。 🌐 In Strapi 5, the Users & Permissions plugin's register.allowedFields defaults to an empty array, requiring explicit field allowlisting instead of accepting all fields by default. - [服务器配置 'webhooks.populateRelations' 已被移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/remove-webhook-populate-relations.md): 在 Strapi 5 中,webhooks.populateRelations 服务器配置已被移除。Webhook 重构消除了使用此选项的需求,但依赖于在创建、更新和删除响应中填充的关联的代码必须更新,以手动获取必要的数据。 🌐 In Strapi 5, the webhooks.populateRelations server configuration is removed. Webhook refactoring eliminates the need for this option, but code relying on populated relations in create, update, and delete responses must be updated to fetch necessary data manually. - [一些仅环境相关的配置选项由服务器配置处理](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/removed-support-for-some-env-options.md): 在 Strapi 5 中,三个环境变量(STRAPIDISABLEREMOTEDATATRANSFER、STRAPIHIDESTARTUPMESSAGE、STRAPIDISABLEUPDATENOTIFICATION)现在通过服务器配置文件而不是环境变量进行配置。 🌐 In Strapi 5, three environment variables (STRAPIDISABLEREMOTEDATATRANSFER, STRAPIHIDESTARTUPMESSAGE, STRAPIDISABLEUPDATENOTIFICATION) are now configured via the server configuration file instead of environment variables. - [启用草稿与发布时,'status' 不能用作属性名称](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/reserved-attributes-status.md): 在 Strapi 5 中,用户定义的“status”属性与草稿和发布状态参数冲突,并且会被内容类型构建器拒绝。 - [服务器日志级别是 `http`](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/server-default-log-level.md): 在 Strapi 5 中,服务器日志级别默认设置为 http 而不是 silly,通过隐藏 silly 和 debug 级别的日志,减少了冗长的日志记录。在服务器配置文件中配置日志级别以调整输出的详细程度。 🌐 In Strapi 5, the server log level defaults to http instead of silly, reducing verbose logging by hiding silly and debug level logs. Configure the log level in your server configuration file to adjust output verbosity. - [服务器代理配置](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/server-proxy.md): 在 Strapi 5 中,所有代理配置选项都被整合到 /config/server.js|ts 中的 server.proxy 对象下,取代了 v4 中单独的 server.globalProxy 和 server.proxy 选项。 🌐 In Strapi 5, all proxy configuration options are consolidated under the server.proxy object in /config/server.js|ts, replacing separate server.globalProxy and server.proxy options from v4. - [按ID排序不再能够按时间顺序排序](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/sort-by-id.md): 由于基于 UUID 的文档,Strapi 5 中按 id 排序不再按时间顺序工作;请改用 Document Service API 的 createdAt。 🌐 Sorting by id no longer works chronologically in Strapi 5 due to uuid-based documents; use createdAt with the Document Service API instead. - [Strapi 是 Container 的一个子类](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/strapi-container.md): 在 Strapi 5 中,Strapi 是 Container 的子类,允许你在 strapi 对象上直接使用 strapi.add() 和 strapi.get() 访问容器方法,而不是使用 strapi.container.register() 和 strapi.container.get()。 🌐 In Strapi 5, Strapi is a subclass of Container, allowing you to access container methods directly on the strapi object using strapi.add() and strapi.get() instead of strapi.container.register() and strapi.container.get(). - [Strapi 工厂导入已更新](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/strapi-imports.md): 在 Strapi 5 中,应用初始化函数和工厂的导入语法已更新;请使用 createStrapi 从 @strapi/strapi 导入,而不是 v4 的模式,而且一些旧的导入模式不再受支持。 🌐 In Strapi 5, the import syntax for the application init function and factories has been updated; use createStrapi from @strapi/strapi instead of the v4 patterns, and some legacy import patterns are no longer supported. - [strapi-utils 已重构](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/strapi-utils-refactored.md): 在 Strapi 5 中,strapi-utils 包进行了重构,实用工具被重新组织到 arrays、dates、strings、objects 和 async 命名空间中,并且一些实用工具被移动、替换为服务方法或被移除。 🌐 In Strapi 5, the strapi-utils package is refactored with utilities reorganized into arrays, dates, strings, objects, and async namespaces, and some utilities moved, replaced with service methods, or removed. - [配置文件名的严格要求](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/strict-requirements-config-files.md): Strapi 5 对 /config/ 文件夹中的配置文件实现严格的命名要求:不允许大小写不敏感的重复文件、禁止重复的基础文件名,并且某些保留名称被阻止;自定义配置应使用符合这些规则命名的文件。 🌐 Strapi 5 enforces strict naming requirements for configuration files in the /config/ folder: no case-insensitive duplicates, no duplicate base filenames, and certain reserved names are blocked; custom configurations should use files with names compliant to these rules. - [模板现在是常规的、独立的 Strapi 应用](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/templates.md): 模板现在是独立的 Strapi 5 应用,而不是具有严格要求的 npm 包,这使得它们更容易创建、分发和重用。 🌐 Templates are now standalone Strapi 5 applications instead of npm packages with strict requirements, making them easier to create, distribute, and reuse. - [Apollo 服务器 v3 升级到 Apollo 服务器 v4](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/upgrade-to-apollov4.md): Strapi 5 将 Apollo Server 从 v3 升级到 v4,将 GraphQL 从 v15 升级到 v16,需对错误处理、CSRF 防护和插件配置进行迁移更新。 🌐 Strapi 5 upgrades Apollo Server from v3 to v4 and GraphQL from v15 to v16, requiring migration updates to error handling, CSRF prevention, and plugin configuration. - [在 API 调用中应该使用 documentId 而不是 id](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/use-document-id.md): 在 Strapi 5 中,documentId 字段取代了 id,用于在内容 API 调用(REST API 和 GraphQL)中识别文档,这是文档服务 API 过渡的一部分。 🌐 In Strapi 5, the documentId field replaces id for identifying documents in Content API calls (REST API and GraphQL) as part of the Document Service API transition. - [Vite 是默认的打包工具](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/vite.md): 在 Strapi 5 中,Vite 取代了 webpack 成为默认的打包器。拥有自定义 webpack 配置的用户可以转换为 Vite 配置,或者使用 --bundler=webpack 来保持 v4 的行为。 🌐 In Strapi 5, Vite replaces webpack as the default bundler. Users with custom webpack configurations can convert to Vite configurations or use --bundler=webpack to maintain v4 behavior. - [Webpack 别名已被移除](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/webpack-aliases-removed.md): Strapi v5 移除了大多数 webpack 别名以提高兼容性,仅保留像 react、react-dom、react-router-dom 和 styled-components 这样的必要依赖的别名。 🌐 Strapi v5 removes most webpack aliases for better compatibility, keeping only essential dependencies like react, react-dom, react-router-dom, and styled-components aliased. - [CLI 的默认包管理器不再是 yarn](https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/yarn-not-default.md): 在 Strapi 5 中,CLI 会检测你的包管理器并使用它来安装依赖,而不是默认使用 yarn。如果你需要特别强制使用 yarn,请使用 --use-yarn 标志。 🌐 In Strapi 5, the CLI detects your package manager and uses it to install dependencies instead of defaulting to yarn. Use the --use-yarn flag if you need to enforce yarn specifically. - [升级到 Strapi 5 - 简介和常见问题](https://strapi.nodejs.cn/cms/migration/v4-to-v5/introduction-and-faq.md): 从 v4 升级到 Strapi 5 使用带有 codemods 的升级工具来处理代码更改,而内置的数据迁移脚本会在首次启动时自动更新数据库。 🌐 Upgrading to Strapi 5 from v4 uses an upgrade tool with codemods to handle code changes, while built-in data migration scripts automatically update the database on first startup. - [逐步升级到 Strapi 5 的指南](https://strapi.nodejs.cn/cms/migration/v4-to-v5/step-by-step.md): 按照逐步说明将你的 Strapi v4 应用升级到 Strapi 5,包括数据库和代码备份、运行自动升级工具、处理手动代码更新,以及使用兼容性头逐步迁移你的 REST 和 GraphQL API 调用。 🌐 Follow step-by-step instructions to upgrade your Strapi v4 application to Strapi 5, including database and code backups, running the automated upgrade tool, handling manual code updates, and gradually migrating your REST and GraphQL API calls using compatibility headers. - [管理员获取客户端](https://strapi.nodejs.cn/cms/plugins-development/admin-fetch-client.md): 在 React 组件内使用 useFetchClient,在其他地方使用 getFetchClient 来调用附带用户身份验证令牌的 Strapi API。两者都提供 get、post、put 和 del 方法,并在收到 401 响应时自动刷新令牌。 🌐 Use useFetchClient inside React components and getFetchClient elsewhere to call Strapi APIs with the user's authentication token attached. Both expose get, post, put, and del methods with automatic token refresh on 401 responses. - [管理员钩子](https://strapi.nodejs.cn/cms/plugins-development/admin-hooks.md): Hooks API 允许插件创建扩展点(createHook 在 register 中)并订阅它们(registerHook 在 bootstrap 中)。Hooks 可以串行、瀑布式或并行运行。Strapi 为内容管理器的列表和编辑视图包含了预定义的 hooks。 🌐 The Hooks API lets plugins create extension points (createHook in register) and subscribe to them (registerHook in bootstrap). Hooks run in series, waterfall, or parallel. Strapi includes predefined hooks for the Content Manager's List and Edit views. - [管理员注入区](https://strapi.nodejs.cn/cms/plugins-development/admin-injection-zones.md): 注入区域是在管理界面中预定义的区域,插件可以在这些区域注入 React 组件。使用 getPlugin('content-manager').injectComponent() 来扩展内置视图,或在 registerPlugin 中使用 injectionZones 定义自己的区域。 🌐 Injection zones are predefined areas in the admin UI where plugins can inject React components. Use getPlugin('content-manager').injectComponent() to extend built-in views, or define your own zones with injectionZones in registerPlugin. - [管理员本地化](https://strapi.nodejs.cn/cms/plugins-development/admin-localization.md): 使用 registerTrads 注册翻译文件,使用你的插件 ID 作为键前缀以避免冲突,并在组件中使用 react-intl 的 useIntl 钩子。Strapi 会自动将插件翻译与核心翻译合并。 🌐 Register translation files with registerTrads, prefix keys with your plugin ID to avoid conflicts, and use react-intl's useIntl hook in components. Strapi merges plugin translations with core translations automatically. - [管理员导航与设置](https://strapi.nodejs.cn/cms/plugins-development/admin-navigation-settings.md): 在 register 中使用 addMenuLink 来添加侧边栏链接。使用 addSettingsLink 可以创建新的设置部分(将部分对象作为第一个参数传递)以及扩展现有部分(传递部分 ID 字符串)。传统的 createSettingSection 和 addSettingsLinks 方法已被弃用。 🌐 Use addMenuLink in register to add sidebar links. Use addSettingsLink to both create new settings sections (pass a section object as the first argument) and extend existing ones (pass a section id string). The legacy createSettingSection and addSettingsLinks methods are deprecated. - [管理面板 API 概述](https://strapi.nodejs.cn/cms/plugins-development/admin-panel-api.md): 管理面板 API 提供 register、bootstrap 和 registerTrads 钩子,用于向 Strapi 的 UI 注入 React 组件和翻译。菜单、设置、注入区、reducer 和钩子 API 允许插件添加导航、配置面板或自定义操作。 - [Redux 存储和 reducers](https://strapi.nodejs.cn/cms/plugins-development/admin-redux-store.md): 在 register 期间使用 addReducers() 向 Redux 存储添加自定义状态。然后使用 useSelector 读取状态,使用 useDispatch 更新状态,并使用 useStore 订阅更改。adminapp 切片暴露主题、语言环境、权限和认证数据。 🌐 Use addReducers() during register to add custom state to the Redux store. Then read state with useSelector, update it with useDispatch, and subscribe to changes with useStore. The adminapp slice exposes theme, locale, permissions, and authentication data. - [内容管理器 API](https://strapi.nodejs.cn/cms/plugins-development/content-manager-apis.md): 内容管理器 API 通过 addEditViewSidePanel、addDocumentAction、addDocumentHeaderAction、addBulkAction 或 addRichTextBlocks 向内容管理器添加面板、操作和自定义富文本块。每个 API 都接受带有类型化上下文的组件函数,从而实现对文档感知 UI 注入的精确控制。 - [插件创建与设置](https://strapi.nodejs.cn/cms/plugins-development/create-a-plugin.md): 插件 SDK 可以在没有 Strapi 项目的情况下生成插件,并使用 watch:link 和 yalc 将它们链接到现有应用。在本指南中:构建和验证命令用于打包插件以发布到 npm 或市场,以及用于 monorepo 和本地设置的信息。 - [开发插件](https://strapi.nodejs.cn/cms/plugins-development/developing-plugins.md): Strapi 插件通过使用管理面板 API、服务器 API 或 MCP 服务器工具来扩展核心功能。插件可以是本地的或发布到市场的,并且使用插件 SDK 创建。 🌐 Strapi plugins extend core functionality using Admin Panel API, Server API, or MCP server tools. Plugins can be local or published to the Marketplace, and are created using the Plugin SDK. - [通过插件扩展 MCP 服务器](https://strapi.nodejs.cn/cms/plugins-development/extend-mcp-server.md): Strapi 插件可以通过 strapi.ai.mcp 服务注册额外的 MCP 工具。注册必须在 MCP 服务器空闲时(在插件的 register() 生命周期阶段),并且在服务器启动之前进行。 - [如何从插件创建管理员权限](https://strapi.nodejs.cn/cms/plugins-development/guides/admin-permissions-for-plugins.md): 插件可以使用 strapi.admin.services.permission.actionProvider.registerMany() 在服务器端注册管理员权限,然后使用 保护页面、菜单链接和组件,使用 useRBAC 钩子来执行基于角色的访问控制。 🌐 Plugins can register admin permissions server-side using strapi.admin.services.permission.actionProvider.registerMany(), then protect pages with , menu links, and components using the useRBAC hook to enforce role-based access control. - [如何为 Strapi 插件创建组件](https://strapi.nodejs.cn/cms/plugins-development/guides/create-components-for-plugins.md): 使用内容类型构建器为 Strapi 插件创建可重用的 component 数据结构,或者通过在插件的服务器目录中定义包含属性和元数据的模式文件手动创建。 🌐 Create reusable component data structures for Strapi plugins using the Content-Type Builder or manually by defining a schema file with attributes and metadata in your plugin's server directory. - [如何通过 Strapi 插件将数据从服务器传递到管理面板](https://strapi.nodejs.cn/cms/plugins-development/guides/pass-data-from-server-to-admin.md): 通过创建自定义管理路由并使用 getFetchClient API 从管理组件请求数据,将数据从 Strapi 插件的服务器传递到管理面板。 🌐 Pass data from a Strapi plugin's server to the admin panel by creating a custom admin route and using the getFetchClient API to request data from admin components. - [如何在插件中重用内置的管理面板组件](https://strapi.nodejs.cn/cms/plugins-development/guides/reuse-admin-panel-components.md): 内置的管理面板组件通过组件注册表暴露,你可以使用 useStrapiApp 钩子读取它们。本指南以媒体库对话框(MediaLibraryDialog)为例:从注册表中访问它,然后将其渲染以重用 Strapi 的资源选择对话框,可选地使用 initiallySelectedAssets 属性预先选择资源。 - [如何从 Strapi 插件存储和访问数据](https://strapi.nodejs.cn/cms/plugins-development/guides/store-and-access-data.md): 插件内容类型存储并持久化数据,就像标准内容类型一样。使用 CLI 生成器创建它们,然后通过文档服务 API 或查询引擎 API 与数据进行交互。 🌐 Plugin content-types store and persist data like standard content-types. Use the CLI generator to create them, then interact with data via the Document Service API or Query Engine API. - [插件 SDK 参考](https://strapi.nodejs.cn/cms/plugins-development/plugin-sdk.md): 插件 SDK 是来自 @strapi/sdk-plugin 的一组命令,用于在本地或发布到 NPM 和市场上创建、构建、链接和发布 Strapi 插件。 🌐 The Plugin SDK is a set of commands from @strapi/sdk-plugin for creating, building, linking, and publishing Strapi plugins locally or to NPM and the Marketplace. - [插件结构](https://strapi.nodejs.cn/cms/plugins-development/plugin-structure.md): 一个 Strapi 插件分为一个用于管理面板 UI 组件的 admin/ 文件夹和一个用于后端逻辑(如内容类型和控制器)的 server/ 文件夹,每个文件夹都有自己的 API。 🌐 A Strapi plugin is divided into an admin/ folder for admin panel UI components and a server/ folder for backend logic like content-types and controllers, each with its own API. - [插件扩展](https://strapi.nodejs.cn/cms/plugins-development/plugins-extension.md): 现有插件可以通过将代码放置在 /src/extensions 或使用全局 register/bootstrap 钩子来覆盖。本手册中的说明涵盖了重塑插件内容类型模式或服务器逻辑 —— 尽管上游更新可能会破坏扩展。 - [插件的服务器 API](https://strapi.nodejs.cn/cms/plugins-development/server-api.md): 服务器 API 定义了插件在 Strapi 服务器上注册、暴露和执行的内容。它包括生命周期钩子、路由、控制器、服务、策略、中间件和配置。使用入口文件声明插件的贡献内容,然后导航到下面为每个功能提供的专用页面。 - [服务器配置](https://strapi.nodejs.cn/cms/plugins-development/server-configuration.md): 服务器 API 提供一个带有 default 属性和 validator 函数的 config 对象。Strapi 会将默认值与用户的 config/plugins 文件进行深度合并,然后在插件加载前运行验证。使用 strapi.plugin('my-plugin').config('key') 在运行时读取配置。 - [服务器内容类型](https://strapi.nodejs.cn/cms/plugins-development/server-content-types.md): 服务器 API 从服务器入口文件导出一个 contentTypes 对象以声明插件内容类型。推荐的命名约定是对导出键和值 info.singularName 使用相同的值,以便在查询或清理数据时运行时 UID 保持可预测。 - [服务器控制器和服务](https://strapi.nodejs.cn/cms/plugins-development/server-controllers-services.md): 就像 Strapi 核心一样,插件也可以有控制器和服务。插件控制器处理 HTTP 层:它们接收 ctx、调用服务并返回响应。插件服务包含可重用的业务逻辑,并通过文档服务 API 与内容类型交互。保持控制器简洁,将字段逻辑放在服务中。 - [服务器获取器及使用](https://strapi.nodejs.cn/cms/plugins-development/server-getters-usage.md): 通过顶层 getter (strapi.plugin('my-plugin').service('name')) 或全局 getter (strapi.service('plugin::my-plugin.name')) 访问插件资源。两者返回相同的对象。在自己的插件中使用顶层 getter,在应用代码或其他插件中使用全局 getter。路由没有全局 getter 的对应项。配置使用专用的配置 API。 - [服务器生命周期](https://strapi.nodejs.cn/cms/plugins-development/server-lifecycle.md): 服务器 API 有 3 个生命周期函数。在应用完全初始化之前,使用 register() 声明功能;初始化 Strapi 后,使用 bootstrap() 运行逻辑;关闭时,使用 destroy() 清理资源。每个函数都接收 { strapi } 作为其参数。 - [服务器策略和中间件](https://strapi.nodejs.cn/cms/plugins-development/server-policies-middlewares.md): 就像 Strapi 核心一样,插件也可以有策略和中间件。插件策略在控制器动作之前运行,并返回 true 或 false 来允许或阻止请求。插件中间件在整个请求/响应周期中按顺序运行,并调用 next() 以继续。将策略和中间件声明为工厂函数的对象,并在路由中通过插件命名空间的名称引用它们。 - [服务器路由](https://strapi.nodejs.cn/cms/plugins-development/server-routes.md): 服务器 API 从服务器入口文件导出一个 routes 值以公开插件端点。仅对隐式管理路由使用数组格式,使用命名路由格式分离管理和内容 API 路由,或使用工厂回调格式进行动态路由配置。 - [文档插件](https://strapi.nodejs.cn/cms/plugins/documentation.md): 文档插件通过扫描内容类型和路由,为你的 API 自动生成 OpenAPI/Swagger 文档。此文档将引导你完成安装、设置自定义以及限制对文档的访问。 - [GraphQL 插件](https://strapi.nodejs.cn/cms/plugins/graphql.md): GraphQL 插件添加了一个 GraphQL 端点和基于 Apollo 的沙箱,用于创建查询和变更。配置/plugins 中的选项可以让你调整深度、项目限制以及其他 Apollo Server 设置,这些内容在本指南中有详细说明。 - [通过市场安装插件](https://strapi.nodejs.cn/cms/plugins/installing-plugins-via-marketplace.md): 应用内市场列出了带有徽章、搜索功能以及指向详细 Strapi 市场页面的“更多”链接的插件和提供商。本文件说明了如何浏览卡片并按照特定提供商的说明安装新的集成。 - [Sentry 插件](https://strapi.nodejs.cn/cms/plugins/sentry.md): Sentry 插件将 Strapi 连接到 Sentry,以报告错误并附加调试元数据。本说明文档详细介绍了安装、基于环境的配置以及在非生产环境中禁用或跳过发送事件的方法。 - [项目结构](https://strapi.nodejs.cn/cms/project-structure.md): Strapi 项目的结构取决于它是使用 TypeScript(--quickstart 的默认选项)还是普通 JavaScript 创建的,并通过交互式项目结构组件显示。 🌐 A Strapi project's structure varies depending on whether it was created with TypeScript (the default with --quickstart) or vanilla JavaScript, and is displayed through an interactive project structure component. - [快速入门指南 - Strapi 开发者文档](https://strapi.nodejs.cn/cms/quick-start.md): 从零开始用12步构建和部署一个Strapi项目:使用create-strapi@latest创建本地项目,使用内容类型构建器定义集合类型,将项目推送到GitHub,并从云仪表板部署到Strapi Cloud,然后通过内容管理器添加内容。 🌐 Build and deploy a Strapi project from scratch in 12 steps: create a local project with create-strapi@latest, define collection types using the Content-Type Builder, push your project to GitHub and deploy to Strapi Cloud from the Cloud dashboard, and add content via the Content Manager. - [安装与部署](https://strapi.nodejs.cn/cms/setup-deployment.md): Strapi 遵循三步工作流程:在本地计算机上安装,配置服务器和管理面板,然后部署到像 Strapi Cloud 这样的远程环境。 🌐 Strapi follows a three-step workflow: install on your local machine, configure the server and admin panel, then deploy to a remote environment like Strapi Cloud. - [strapi-utils](https://strapi.nodejs.cn/cms/strapi-utils.md): @strapi/utils 包提供了用于 Strapi 核心的共享辅助函数,也可用于自定义代码。它包括错误类、环境变量辅助、钩子工厂、类型解析、字符串和文件工具以及异步辅助。 - [模板](https://strapi.nodejs.cn/cms/templates.md): 模板是完整的 Strapi 应用,可以通过 CLI 标志(如 --template、--template-path 和 --template-branch)启动新项目。本指南中的说明涵盖了从 GitHub 引用模板以及将任何 Strapi 项目变成可重用模板的方法。 - [测试](https://strapi.nodejs.cn/cms/testing.md): 测试依赖于 Jest 和 Supertest,以及一个内存中的 SQLite 数据库,一个经过修补的 Strapi 测试工具,它还支持 TypeScript 配置文件,以及在设置期间自动注册 /hello 路由和认证角色的辅助工具。 - [TypeScript](https://strapi.nodejs.cn/cms/typescript.md): TypeScript 为 Strapi 应用添加了类型系统层,支持类型安全的代码和自动类型生成。使用 --typescript 标志创建一个新的 TypeScript 项目,或者为现有项目添加 TypeScript 支持。 🌐 TypeScript adds a type system layer to Strapi applications, enabling type-safe code and automatic type generation. Create a new TypeScript project with the --typescript flag or add TypeScript support to an existing project. - [添加 TypeScript 支持](https://strapi.nodejs.cn/cms/typescript/adding-support-to-existing-project.md): 通过创建带有 allowJs: true 的根和管理员 tsconfig.json 文件为现有 Strapi 项目添加 TypeScript 支持,以进行渐进式迁移,然后重建管理员面板。 🌐 Add TypeScript support to existing Strapi projects by creating root and admin tsconfig.json files with allowJs: true for incremental migration, then rebuild the admin panel. - [TypeScript 开发](https://strapi.nodejs.cn/cms/typescript/development.md): TypeScript 开发展示了 Strapi 类型定义以实现自动补全、使用 ts:generate-types 进行模式类型生成,以及通过 strapi() 或 strapi.compile() 以编程方式启动服务器。本指南涉及插件构建和管理生成的类型定义。 - [TypeScript - 操作文档和条目](https://strapi.nodejs.cn/cms/typescript/documents-and-entries.md): 在 Strapi v5 TypeScript 项目中安全地操作文档和条目,使用 UID 和 Data 命名空间以确保类型安全,同时支持通用和已知实体类型的操作,并提供代码补全功能。 🌐 Safely manipulate documents and entries in Strapi v5 TypeScript projects using the UID and Data namespaces for type safety, enabling both generic and known entity type operations with code completion. - [TypeScript 指南](https://strapi.nodejs.cn/cms/typescript/guides.md): 在 Strapi 项目中使用 TypeScript 的指南,包括操作文档和条目的模式,以及为现有项目添加 TypeScript 支持。 🌐 Guides for leveraging TypeScript in Strapi projects, covering patterns for manipulating documents and entries, and adding TypeScript support to existing projects. - [升级工具](https://strapi.nodejs.cn/cms/upgrade-tool.md): 升级工具是一个 CLI 命令,它通过更新依赖并将代码修改应用到代码库中,自动将 Strapi 应用升级到新版本。 🌐 The upgrade tool is a CLI command that automatically upgrades Strapi applications to a new version by updating dependencies and applying codemods to the codebase. - [升级](https://strapi.nodejs.cn/cms/upgrades.md): Strapi 会定期发布带有改进的新版本。在管理面板或终端中找到你当前的版本,然后按照 Strapi 从 v4 升级到 v5 的指南进行操作,或使用升级工具进行 v5.x 更新。 🌐 Strapi periodically releases new versions with improvements. Find your current version in the admin panel or terminal, then follow the upgrade guide for Strapi v4 to v5 migration or use the upgrade tool for v5.x updates. - [使用信息](https://strapi.nodejs.cn/cms/usage-information.md): Strapi 收集非敏感的聚合数据,如项目 ID、机器 ID、环境状态和操作系统,以改进平台,遵守 GDPR,并可通过 telemetry:disable 命令或 strapi.telemetryDisabled 标志选择退出。 🌐 Strapi collects non-sensitive aggregated data like project ID, machine ID, environment state, and OS to improve the platform, with GDPR compliance and opt-out available via telemetry:disable command or strapi.telemetryDisabled flag.