mirror of https://github.com/halo-dev/halo
![]() <!-- Thanks for sending a pull request! Here are some tips for you: 1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。 1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>. 2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。 2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. 3. 请确保你已经添加并运行了适当的测试。 3. Ensure you have added or ran the appropriate tests for your PR. --> #### What type of PR is this? /kind improvement /milestone 2.0 /area core <!-- 添加其中一个类别: Add one of the following kinds: /kind bug /kind cleanup /kind documentation /kind feature /kind improvement 适当添加其中一个或多个类别(可选): Optionally add one or more of the following kinds if applicable: /kind api-change /kind deprecation /kind failing-test /kind flake /kind regression --> #### What this PR does / why we need it: 使用 SpringComponentsFinder 覆盖 pf4j 默认实现的插件组件类缓存逻辑,以解决插件安装后缓存没有更新导致插件类加载不正确问题 原问题浮现步骤: 1. 先删除插件目录的所有插件 2. 通过接口上传一个插件`apis/api.halo.run/v1alpha1/plugins/install` 3. 启动它 4. 再上传另一个插件并启动它就会发现这个插件无法启动 现在修复过后可以重复测试上述步骤并观察日志显示的插件组件是否被正确加载,再此之前你可能需要配置以下日志级别 ``` logging: level: org.pf4j.AbstractExtensionFinder: DEBUG ``` 启动插件时观察这样的日志是否符合预期: ``` r.h.app.plugin.SpringComponentsFinder : Read 'META-INF/plugin-components.idx' org.pf4j.AbstractExtensionFinder : Found possible 2 extensions: org.pf4j.AbstractExtensionFinder : run.halo.template.TemplatePlugin org.pf4j.AbstractExtensionFinder : run.halo.template.ApplesController r.h.app.plugin.SpringComponentsFinder : Load [2] component names into storage cache for plugin [PluginTemplate]. ``` 可以结合此 PR 上传插件进行测试 https://github.com/halo-dev/halo-admin/pull/590 #### Which issue(s) this PR fixes: <!-- PR 合并时自动关闭 issue。 Automatically closes linked issue when PR is merged. 用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)` Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? <!-- 如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。 否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change), Release Note 需要以 `action required` 开头。 If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note None ``` |
||
---|---|---|
.github | ||
config/checkstyle | ||
docs/developer-guide | ||
gradle/wrapper | ||
hack | ||
src | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LICENSE | ||
OWNERS | ||
README.md | ||
SECURITY.md | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle |
README.md
Halo [ˈheɪloʊ],一款现代化的开源博客/CMS系统,值得一试。
快速开始
Fat Jar
下载最新的 Halo 运行包:
curl -L https://github.com/halo-dev/halo/releases/download/v1.4.17/halo-1.4.17.jar --output halo.jar
其他地址:https://docs.halo.run/getting-started/downloads
java -jar halo.jar
Docker
docker run -it -d --name halo -p 8090:8090 -v ~/.halo:/root/.halo --restart=always halohub/halo
详细部署文档请查阅:https://docs.halo.run/getting-started/install/linux
在线体验
- 环境地址:https://demo.halo.run
- 后台地址:https://demo.halo.run/admin
- 用户名:demo
- 密码:P@ssw0rd123..
- 使用前请阅读:https://demo.halo.run/archives/tips
生态
项目 | 状态 | 描述 |
---|---|---|
halo-admin | Web 管理端 UI,已内置在主应用 | |
js-sdk | JavaScript SDK | |
halo-comment | 独立评论组件,可以非常方便的集成到主题中 | |
halo-comment-normal | 另外一款评论组件 | |
halo-mobile-app | 已停止维护 | 移动端管理 APP |
tencent-cloudbase-halo | 无 | 腾讯云 CloudBase 一键部署配置 |
halo-theme-* | 无 | GitHub 上开源的 Halo 主题集合 |
许可证
Halo 使用 GPL-v3.0 协议开源,请遵守开源协议。
贡献
参考 CONTRIBUTING。