Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme #51

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# plugin-migrate

支持多种平台的数据迁移,目前已支持:
支持从其他平台迁移数据到 Halo 的插件。

![Screenshot](./docs/img/screenshot.png)

目前已支持以下平台:

1. Halo 1.5 / 1.6
2. [WordPress](https://wordpress.org/)
Expand All @@ -21,6 +25,17 @@

## 开发环境

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

所需环境:

1. Java 17
2. Node 18
3. pnpm 8
4. Docker (可选)

克隆项目:

```bash
git clone [email protected]:halo-sigs/plugin-migrate.git

Expand All @@ -33,6 +48,10 @@ git clone [email protected]:{your_github_id}/plugin-migrate.git
cd path/to/plugin-migrate
```

### 运行方式 1(推荐)

> 此方式需要本地安装 Docker

```bash
# macOS / Linux
./gradlew pnpmInstall
Expand All @@ -41,6 +60,22 @@ cd path/to/plugin-migrate
./gradlew.bat pnpmInstall
```

```bash
# macOS / Linux
./gradlew haloServer

# Windows
./gradlew.bat haloServer
```

执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅:<https://docs.halo.run/developer-guide/plugin/basics/devtools>

### 运行方式 2

> 此方式需要使用源码运行 Halo

编译插件:

```bash
# macOS / Linux
./gradlew build
Expand All @@ -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 项目即可。
Binary file added docs/img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 45 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
# 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/)

## 使用方式

1. 下载,目前提供以下两个下载方式:
- GitHub Releases:访问 [Releases](https://github.com/halo-sigs/plugin-migrate/releases) 下载 Assets 中的 JAR 文件。
- Halo 应用市场:<https://halo.run/store/apps/app-TlUBt>
2. 安装,插件安装和更新方式可参考:<https://docs.halo.run/user-guide/plugins>
3. 启动插件之后,即可在 Console 的左侧菜单栏看到**迁移**的菜单。
3. 启动插件之后,即可在 Console 的左侧菜单栏看到 **迁移** 的菜单。

> **Warning**
> 详细的迁移文档请查阅 <https://halo-plugin-migrate.pages.dev>

## 开发环境

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

所需环境:

1. Java 17
2. Node 18
3. pnpm 8
4. Docker (可选)

克隆项目:

```bash
git clone [email protected]:halo-sigs/plugin-migrate.git

Expand All @@ -30,6 +48,10 @@ git clone [email protected]:{your_github_id}/plugin-migrate.git
cd path/to/plugin-migrate
```

### 运行方式 1(推荐)

> 此方式需要本地安装 Docker

```bash
# macOS / Linux
./gradlew pnpmInstall
Expand All @@ -38,6 +60,22 @@ cd path/to/plugin-migrate
./gradlew.bat pnpmInstall
```

```bash
# macOS / Linux
./gradlew haloServer

# Windows
./gradlew.bat haloServer
```

执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅:<https://docs.halo.run/developer-guide/plugin/basics/devtools>

### 运行方式 2

> 此方式需要使用源码运行 Halo

编译插件:

```bash
# macOS / Linux
./gradlew build
Expand All @@ -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 项目即可。