-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
完善 README 的开发文档,添加使用 `./gradlew haloServer` 运行插件的方式。 /kind documentation ```release-note None ```
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,15 @@ Halo 2.0 插件开发快速开始模板。 | |
|
||
插件开发的详细文档请查阅:<https://docs.halo.run/developer-guide/plugin/hello-world> | ||
|
||
所需环境: | ||
|
||
1. Java 17 | ||
2. Node 18 | ||
3. pnpm 8 | ||
4. Docker (可选) | ||
|
||
克隆项目: | ||
|
||
```bash | ||
git clone [email protected]:halo-sigs/plugin-starter.git | ||
|
||
|
@@ -18,6 +27,10 @@ git clone [email protected]:{your_github_id}/plugin-starter.git | |
cd path/to/plugin-starter | ||
``` | ||
|
||
### 运行方式 1(推荐) | ||
|
||
> 此方式需要本地安装 Docker | ||
```bash | ||
# macOS / Linux | ||
./gradlew pnpmInstall | ||
|
@@ -26,6 +39,22 @@ cd path/to/plugin-starter | |
./gradlew.bat pnpmInstall | ||
``` | ||
|
||
```bash | ||
# macOS / Linux | ||
./gradlew haloServer | ||
|
||
# Windows | ||
./gradlew.bat haloServer | ||
``` | ||
|
||
执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅:<https://github.com/halo-sigs/halo-gradle-plugin> | ||
|
||
### 运行方式 2 | ||
|
||
> 此方式需要使用源码运行 Halo | ||
编译插件: | ||
|
||
```bash | ||
# macOS / Linux | ||
./gradlew build | ||
|
@@ -43,3 +72,5 @@ halo: | |
fixedPluginPath: | ||
- "/path/to/plugin-starter" | ||
``` | ||
最后重启 Halo 项目即可。 |