开发 Strapi 插件
¥Developing Strapi plugins
本节介绍开发 Strapi 插件以将其用作本地插件或将其提交到 Marketplace。不是你要找的?阅读 插件介绍 并找到你的用例和推荐部分以从那里阅读。
¥This section is about developing Strapi plugins to use them as local plugins or to submit them to the Marketplace. Not what you're looking for? Read the plugins introduction and find your use case and recommended section to read from there.
Strapi 允许开发与 市场 提供的内置插件或第三方插件完全相同的插件。创建后,你的插件可以是:
¥Strapi allows the development of plugins that work exactly like the built-in plugins or 3rd-party plugins available from the Marketplace. Once created, your plugin can be:
用作本地插件,仅适用于特定的 Strapi 项目,
¥used as a local plugin, working only with a specific Strapi project,
或 提交至市场 与社区共享。
¥or submitted to the Marketplace to be shared with the community.
👉 要开始开发 Strapi 插件:
¥👉 To start developing a Strapi plugin:
创建一个插件 使用插件 SDK。
¥Create a plugin using the Plugin SDK.
了解有关 插件的结构 的更多信息。
¥Learn more about the structure of a plugin.
了解 插件 API 的概述以向你的插件添加功能。
¥Get an overview of the plugin APIs to add features to your plugin.
查询可以接受 guides 参数来根据文档状态获取文档:
¥Read some advanced guides based on your use case(s).
确保你以不同的主要版本号发布 Strapi 5 插件,以将其与 v4 兼容版本区分开来。
¥Ensure you release your Strapi 5 plugin as a different major version number to distinguish it from the v4 compatible version.
插件 API
¥Plugin APIs
Strapi 为插件提供以下编程 API 来连接 Strapi 的一些功能:
¥Strapi provides the following programmatic APIs for plugins to hook into some of Strapi's features:
📄️ Admin Panel API
Use the Admin Panel API to have your plugin interact with the admin panel of Strapi.
📄️ Server API
Use the Server API to have your plugin interact with the backend server of Strapi.
指南
¥Guides
💁 How to store and access data from a Strapi plugin
💁 How to pass data from the backend server to the admin panel with a plugin
贡献者文档 还可以包含开发 Strapi 插件时有用的附加信息。
¥The contributors documentation can also include additional information useful while developing a Strapi plugin.