Skip to main content

开发 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:

  1. 创建一个插件 使用基于 CLI 的生成器。

    ¥Create a plugin using the CLI-based generator.

  2. 了解有关 插件的结构 的更多信息。

    ¥Learn more about the structure of a plugin.

  3. 了解 插件 API 的概述以向你的插件添加功能。

    ¥Get an overview of the plugin APIs to add features to your plugin.

  4. 根据你的用例阅读一些 guides

    ¥Read some guides based on your use case(s).

插件 API

¥Plugin APIs

Strapi 为插件提供以下编程 API 来连接 Strapi 的一些功能:

¥Strapi provides the following programmatic APIs for plugins to hook into some of Strapi's features:

🤓 自定义字段插件

插件也可用于将 自定义字段 添加到 Strapi。

¥Plugins can also be used to add custom fields to Strapi.

指南

¥Guides


🤓 其他资源

Strapi 博客有一个关于创建 Strapi v4 '去做' 插件的 教程系列贡献者文档 还可以包含开发 Strapi 插件时有用的附加信息。

¥The Strapi blog features a tutorial series about creating a Strapi v4 'Todo' plugin. The contributors documentation can also include additional information useful while developing a Strapi plugin.