Skip to content

Commit

Permalink
add(*): add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
monyuan committed Jan 2, 2024
1 parent b6a5440 commit f7a18d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 74 deletions.
75 changes: 4 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,9 @@
# plugin-starter
# Notify Me

Halo 2.0 插件开发快速开始模板。
当有新评论、新文章、等待审核的评论、等待审核的文章时将消息推送到微信、企业微信、飞书、钉钉等12个应用

## 开发环境
- 使用了AnPush推送服务,有免费额度,个人博客够用
- 不够用可以多注册几个账号薅羊毛,但是不建议,多支持下开发者

插件开发的详细文档请查阅:<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

# 或者当你 fork 之后

git clone [email protected]:{your_github_id}/plugin-starter.git
```

```bash
cd path/to/plugin-starter
```

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

> 此方式需要本地安装 Docker
```bash
# macOS / Linux
./gradlew pnpmInstall

# Windows
./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

# Windows
./gradlew.bat build
```

修改 Halo 配置文件:

```yaml
halo:
plugin:
runtime-mode: development
fixedPluginPath:
- "/path/to/plugin-starter"
```
最后重启 Halo 项目即可。
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=1.0.0-SNAPSHOT
org.gradle.java.home=/Users/mon/Library/Java/JavaVirtualMachines/corretto-17.0.9/Contents/Home
#本地开发使用 org.gradle.java.home=/Users/mon/Library/Java/JavaVirtualMachines/corretto-17.0.9/Contents/Home
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ spec:
author:
name: 稀奇
website: https://xiqi.org
logo: /logo.png
homepage: https://github.com/halo-dev/plugin-starter
logo: https://i0.wp.com/raw.githubusercontent.com/monyuan/notify-me/main/ui/src/assets/notify.png
homepage: https://github.com/monyuan/notify-me
displayName: "通知我"
description: "当有评论时推送通知到微信、企业微信、飞书、钉钉、微信测试号、Slack等12个应用,使用了AnPush服务。"
license:
Expand Down

0 comments on commit f7a18d2

Please sign in to comment.