Skip to content

Commit ba473f7

Browse files
authored
docs: refine readme (#18)
完善 README 的开发文档,添加使用 `./gradlew haloServer` 运行插件的方式。 /kind documentation ```release-note None ```
1 parent 5d1f25e commit ba473f7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Halo 2.0 插件开发快速开始模板。
66

77
插件开发的详细文档请查阅:<https://docs.halo.run/developer-guide/plugin/hello-world>
88

9+
所需环境:
10+
11+
1. Java 17
12+
2. Node 18
13+
3. pnpm 8
14+
4. Docker (可选)
15+
16+
克隆项目:
17+
918
```bash
1019
git clone [email protected]:halo-sigs/plugin-starter.git
1120

@@ -18,6 +27,10 @@ git clone [email protected]:{your_github_id}/plugin-starter.git
1827
cd path/to/plugin-starter
1928
```
2029

30+
### 运行方式 1(推荐)
31+
32+
> 此方式需要本地安装 Docker
33+
2134
```bash
2235
# macOS / Linux
2336
./gradlew pnpmInstall
@@ -26,6 +39,22 @@ cd path/to/plugin-starter
2639
./gradlew.bat pnpmInstall
2740
```
2841

42+
```bash
43+
# macOS / Linux
44+
./gradlew haloServer
45+
46+
# Windows
47+
./gradlew.bat haloServer
48+
```
49+
50+
执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅:<https://github.com/halo-sigs/halo-gradle-plugin>
51+
52+
### 运行方式 2
53+
54+
> 此方式需要使用源码运行 Halo
55+
56+
编译插件:
57+
2958
```bash
3059
# macOS / Linux
3160
./gradlew build
@@ -43,3 +72,5 @@ halo:
4372
fixedPluginPath:
4473
- "/path/to/plugin-starter"
4574
```
75+
76+
最后重启 Halo 项目即可。

0 commit comments

Comments
 (0)