mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-22 19:04:55 +00:00
chore: bump docusaurus version to 3.x (#395)
升级 Docusaurus 版本至 3.x 参照 https://docusaurus.io/zh-CN/docs/migration/v3 升级指南。 Fixes #394 /kind improvement ```release-note None ```
This commit is contained in:
@@ -11,24 +11,24 @@ description: 这个例子展示了如何开发 Todo List 插件
|
||||
|
||||
1. 修改 `build.gradle` 中的 `group` 为你自己的,如:
|
||||
|
||||
```groovy
|
||||
group = 'run.halo.tutorial'
|
||||
```
|
||||
```groovy
|
||||
group = 'run.halo.tutorial'
|
||||
```
|
||||
|
||||
2. 修改 `settings.gradle` 中的 `rootProject.name`
|
||||
|
||||
```groovy
|
||||
rootProject.name = 'halo-plugin-todolist'
|
||||
```
|
||||
```groovy
|
||||
rootProject.name = 'halo-plugin-todolist'
|
||||
```
|
||||
|
||||
3. 修改插件的描述文件 `plugin.yaml`,它位于 `src/main/resources/plugin.yaml`。示例:
|
||||
|
||||
```yaml
|
||||
apiVersion: plugin.halo.run/v1alpha1
|
||||
kind: Plugin
|
||||
metadata:
|
||||
```yaml
|
||||
apiVersion: plugin.halo.run/v1alpha1
|
||||
kind: Plugin
|
||||
metadata:
|
||||
name: todolist
|
||||
spec:
|
||||
spec:
|
||||
enabled: true
|
||||
requires: ">=2.0.0"
|
||||
author:
|
||||
@@ -40,7 +40,7 @@ description: 这个例子展示了如何开发 Todo List 插件
|
||||
description: "插件开发的 hello world,用于学习如何开发一个简单的 Halo 插件"
|
||||
license:
|
||||
- name: "MIT"
|
||||
```
|
||||
```
|
||||
|
||||
参考链接:
|
||||
|
||||
@@ -82,9 +82,9 @@ description: 这个例子展示了如何开发 Todo List 插件
|
||||
|
||||
2. 然后在项目目录执行命令
|
||||
|
||||
```shell
|
||||
./gradlew build
|
||||
```
|
||||
```shell
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
3. 使用 `IntelliJ IDEA` 打开 Halo,参考 [Halo 开发环境运行](../../core/run.md) 及 [插件入门](../hello-world.md) 配置插件的运行模式和路径:
|
||||
|
||||
|
@@ -9,12 +9,12 @@ description: 了解如何构建你的第一个插件并在 Halo 中使用它。
|
||||
|
||||
1. 打开 [halo-dev/plugin-starter](https://github.com/halo-dev/plugin-starter)。
|
||||
|
||||
> 这是一个插件的初始模板,你可以基于它来开发自己的插件。
|
||||
> 这是一个插件的初始模板,你可以基于它来开发自己的插件。
|
||||
|
||||
2. 点击 `Use this template` -> `Create a new repository`。
|
||||
3. 如图所示填写仓库名后点击 `Create repository from template`。
|
||||
|
||||

|
||||

|
||||
|
||||
你现在已经基于 Halo 插件模板创建了自己的存储库。接下来,你需要将它克隆到你的计算机上并使用 `IntelliJ IDEA` 打开它。
|
||||
|
||||
|
@@ -42,4 +42,4 @@ spec:
|
||||
- `spec.homepage`:通常为插件的 GitHub 仓库链接,或可联系到插件作者或插件官网或帮助中心链接等。
|
||||
- `spec.displayName`:插件的显示名称,它通常是以少数几个字来概括插件的用途。
|
||||
- `spec.description`:插件描述,用一段话来介绍插件的用途。
|
||||
- `spec.license`:插件使用的软件协议,参考:<https://en.wikipedia.org/wiki/Software_license>。
|
||||
- `spec.license`:插件使用的软件协议,参考:[https://en.wikipedia.org/wiki/Software_license](https://en.wikipedia.org/wiki/Software_license)。
|
||||
|
Reference in New Issue
Block a user