diff --git a/README.md b/README.md index 5ef463e..0af89dc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # plugin-migrate -支持多种平台的数据迁移,目前已支持: +支持从其他平台迁移数据到 Halo 的插件。 + +![Screenshot](./docs/img/screenshot.png) + +目前已支持以下平台: 1. Halo 1.5 / 1.6 2. [WordPress](https://wordpress.org/) @@ -21,6 +25,17 @@ ## 开发环境 +插件开发的详细文档请查阅: + +所需环境: + +1. Java 17 +2. Node 18 +3. pnpm 8 +4. Docker (可选) + +克隆项目: + ```bash git clone git@github.com:halo-sigs/plugin-migrate.git @@ -33,6 +48,10 @@ git clone git@github.com:{your_github_id}/plugin-migrate.git cd path/to/plugin-migrate ``` +### 运行方式 1(推荐) + +> 此方式需要本地安装 Docker + ```bash # macOS / Linux ./gradlew pnpmInstall @@ -41,6 +60,22 @@ cd path/to/plugin-migrate ./gradlew.bat pnpmInstall ``` +```bash +# macOS / Linux +./gradlew haloServer + +# Windows +./gradlew.bat haloServer +``` + +执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅: + +### 运行方式 2 + +> 此方式需要使用源码运行 Halo + +编译插件: + ```bash # macOS / Linux ./gradlew build @@ -55,11 +90,8 @@ cd path/to/plugin-migrate halo: plugin: runtime-mode: development - classes-directories: - - "build/classes" - - "build/resources" - lib-directories: - - "libs" fixedPluginPath: - "/path/to/plugin-migrate" ``` + +最后重启 Halo 项目即可。 diff --git a/docs/img/screenshot.png b/docs/img/screenshot.png new file mode 100644 index 0000000..7112ac9 Binary files /dev/null and b/docs/img/screenshot.png differ diff --git a/docs/index.md b/docs/index.md index 3c0da90..6dae1e0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,12 +1,16 @@ # plugin-migrate -支持多种平台的数据迁移,目前已支持: +支持从其他平台迁移数据到 Halo 的插件。 + +![Screenshot](/img/screenshot.png) + +目前已支持以下平台: 1. Halo 1.5 / 1.6 -2. WordPress +2. [WordPress](https://wordpress.org/) 3. RSS / Atom 订阅链接 -4. HUGO -5. Ghost +4. [Hugo](https://gohugo.io/) +5. [Ghost](https://ghost.org/) ## 使用方式 @@ -14,10 +18,24 @@ - GitHub Releases:访问 [Releases](https://github.com/halo-sigs/plugin-migrate/releases) 下载 Assets 中的 JAR 文件。 - Halo 应用市场: 2. 安装,插件安装和更新方式可参考: -3. 启动插件之后,即可在 Console 的左侧菜单栏看到**迁移**的菜单。 +3. 启动插件之后,即可在 Console 的左侧菜单栏看到 **迁移** 的菜单。 + +> **Warning** +> 详细的迁移文档请查阅 ## 开发环境 +插件开发的详细文档请查阅: + +所需环境: + +1. Java 17 +2. Node 18 +3. pnpm 8 +4. Docker (可选) + +克隆项目: + ```bash git clone git@github.com:halo-sigs/plugin-migrate.git @@ -30,6 +48,10 @@ git clone git@github.com:{your_github_id}/plugin-migrate.git cd path/to/plugin-migrate ``` +### 运行方式 1(推荐) + +> 此方式需要本地安装 Docker + ```bash # macOS / Linux ./gradlew pnpmInstall @@ -38,6 +60,22 @@ cd path/to/plugin-migrate ./gradlew.bat pnpmInstall ``` +```bash +# macOS / Linux +./gradlew haloServer + +# Windows +./gradlew.bat haloServer +``` + +执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅: + +### 运行方式 2 + +> 此方式需要使用源码运行 Halo + +编译插件: + ```bash # macOS / Linux ./gradlew build @@ -52,11 +90,8 @@ cd path/to/plugin-migrate halo: plugin: runtime-mode: development - classes-directories: - - "build/classes" - - "build/resources" - lib-directories: - - "libs" fixedPluginPath: - "/path/to/plugin-migrate" ``` + +最后重启 Halo 项目即可。