我完全在不懂java vue node 的前提下,使用ai写的代码,自己提需求后实现,出现错误或偏移也由AI修改,几乎99%的代码由AI构建。
缺点:无法实时更新,需手动更新json
逻辑:将需要的配置信息存储到数据库,然后在去调用你保存过的数据。
可以查看对应保存到数据库内的数据
当你的配置发生变化时,需要手动去进行一个刷新
${APIConfigStoreDataFinder.get('这个地方填写你的标识')}
<div th:with="customData = ${APIConfigStoreDataFinder.get('pinglunpeizhi')}">
<p th:text="${customData.remark}"></p>
<p th:text="${customData.identifier}"></p>
<p th:text="${customData.apiAddress}"></p>
<p th:text="${customData.apiData}"></p>
<p th:text="${customData.apiData.basic.withReplies}"></p>
</div>
插件开发的详细文档请查阅:https://docs.halo.run/developer-guide/plugin/introduction
所需环境:
- Java 17
- Node 20
- pnpm 9
- Docker (可选)
克隆项目:
git clone [email protected]:halo-sigs/plugin-starter.git
# 或者当你 fork 之后
git clone [email protected]:{your_github_id}/plugin-starter.git
cd path/to/plugin-starter
此方式需要本地安装 Docker
# macOS / Linux
./gradlew pnpmInstall
# Windows
./gradlew.bat pnpmInstall
# macOS / Linux
./gradlew haloServer
# Windows
./gradlew.bat haloServer
执行此命令后,会自动创建一个 Halo 的 Docker 容器并加载当前的插件,更多文档可查阅:https://docs.halo.run/developer-guide/plugin/basics/devtools
# 插件前端使用了这两个库,可能需要手动安装一下
pnpm add pinyin@3
pnpm add @formkit/vue
此方式需要使用源码运行 Halo
编译插件:
# macOS / Linux
./gradlew build
# Windows
./gradlew.bat build
修改 Halo 配置文件:
halo:
plugin:
runtime-mode: development
fixedPluginPath:
- "/path/to/plugin-starter"
最后重启 Halo 项目即可。