mirror of https://github.com/halo-dev/halo
![]() #### What type of PR is this? /kind improvement /area core /milestone 2.0.0 #### What this PR does / why we need it: This PR provides an ability to migrate attachments from other places, like Halo 1.x or Wordpress. We could simply configure resource mappings to support attachments migration: ```yaml halo: attachment: resource-mappings: - pathPattern: /upload/** locations: - upload - migrate-from-1.x - pathPattern: /wp-content/uploads/** locations: - migrate-from-wp ``` Meanwhile, I refactored LocalAttachmentUploadHandler for managing attachments from migration in the future. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2585 #### Special notes for your reviewer: **Steps to test:** 1. Try to configure the resource mappings 2. Put some static resources into the corresponding location 3. Access it from Browser At last, please make sure the functionalities of attachment are ok as before. #### Does this PR introduce a user-facing change? ```release-note None ``` |
||
---|---|---|
.github | ||
config/checkstyle | ||
docs | ||
gradle/wrapper | ||
hack | ||
src | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
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ʊ],好用又强大的开源建站工具。
官网
文档(2.0 RC)
社区
Gitee
Telegram 频道
注意
当前分支为 Halo 2.0 的开发分支,目前 Halo 2.0 处于 RC 阶段,暂时无法从 1.5 直接升级,不建议在生产环境使用。稳定版本(Halo 1.x)请查阅以下地址:
- 1.5 分支:https://github.com/halo-dev/halo/tree/release-1.5
- 1.6 分支:https://github.com/halo-dev/halo/tree/release-1.6
- 1.6 文档:https://docs.halo.run
快速开始
Docker
docker run -it -d --name halo-next -p 8090:8090 -v ~/.halo2:/root/.halo2 --restart=unless-stopped halohub/halo-dev:2.0.0-rc.1
详细部署文档请查阅:https://docs.halo.run/2.0.0-SNAPSHOT/getting-started/install/docker
在线体验
- 环境地址:https://demo.halo.run
- 后台地址:https://demo.halo.run/console
- 用户名:
demo
- 密码:
P@ssw0rd123..
生态
可访问 awesome-halo 查看已经适用于 Halo 2.0 的主题和插件,以及适用于 Halo 1.x 的相关仓库。
许可证
Halo 使用 GPL-v3.0 协议开源,请遵守开源协议。
贡献
参考 CONTRIBUTING。