# 支持备份恢复，Halo 2.8.0 发布

原文：<https://www.halo.run/archives/halo-280-released>

Halo 是一款强大易用的开源建站工具，它让你无需太多的技术知识就可以快速搭建一个博客、网站或者内容管理系统。具备可插拔架构、主题套用、富文本编辑器等多重特性，支持用户根据自己的喜好选择不同类型的插件及主题模板来定制化自己的站点功能及外观。让内容创作和发布更加便捷生动。

截至目前（2023 年 Q2 季度），Halo 已经在 Docker Hub 获得了超过 170 万次下载，GitHub Star 数突破 27 k，并拥有一百多名社区贡献者。

2023 年 8 月 1 日，强大易用的开源建站工具 Halo 正式发布 2.8.0 版本。

在这个版本中，Halo 主要支持了备份恢复、用户头像设置等功能，以及其他 30 多项功能优化和问题修复。

## 亮点更新

### 备份恢复

在 Halo 2.8 中，我们原生支持了无损的备份和恢复功能，利用这个功能可以非常方便的进行服务器迁移、数据库切换、数据备份等操作。

![backup.png](https://www.halo.run/upload/backup.png)

![restore.png](https://www.halo.run/upload/restore.png)

### 用户头像设置

在之前的版本中，Halo 仅支持通过添加图片链接的方式为用户设置头像，这其实是一个比较麻烦且不太安全的操作。所以在 Halo 2.8 版本中，我们支持了通过上传图片为用户设置头像，同时支持对图片进行裁剪。

![user-avatar-upload.png](https://www.halo.run/upload/user-avatar-upload.png)

### 编辑器优化

在 Halo 2.8 版本中，我们优化了默认编辑器的模块操作区域的逻辑，现在可以更加方便的对图片、视频等模块进行参数设置，减少了误操作的可能，同时也带来了一些新的功能。

新增了对文字大小、颜色、背景色设置的支持，演示如下：

**字体颜色**

![editor-font-color.png](https://www.halo.run/upload/editor-font-color.png)

**字体背景色**

![editor-highlight.png](https://www.halo.run/upload/editor-highlight.png)

**字体大小**

![editor-font-size.png](https://www.halo.run/upload/editor-font-size.png)

在顶部工具栏前面增加了**更多**按钮，用于统一提供一些更加高级的内容类型，同时支持通过插件扩展。

![editor-toolbox.png](https://www.halo.run/upload/editor-toolbox.png)

## 完整更新日志

### 新特性

-   支持备份和恢复功能。 by [@JohnNiang](https://github.com/JohnNiang) in [#4206](https://github.com/halo-dev/halo/pull/4206)
    
-   支持通过上传和剪裁的方式设置用户头像。 by [@LIlGG](https://github.com/LIlGG) in [#4253](https://github.com/halo-dev/halo/pull/4253)
    
-   支持静态资源映射。 by [@JohnNiang](https://github.com/JohnNiang) in [#4285](https://github.com/halo-dev/halo/pull/4285)
    

### 功能优化

-   升级默认编辑器版本，支持设置字体颜色、大小等功能，优化使用体验。 by [@ruibaby](https://github.com/ruibaby) in [#4288](https://github.com/halo-dev/halo/pull/4288)
    
-   Console 端编辑文章时允许同类型的编辑器切换。 by [@ruibaby](https://github.com/ruibaby) in [#4180](https://github.com/halo-dev/halo/pull/4180)
    
-   重构 Console 端数据列表的筛选项 UI，并提供全局的筛选列表组件和搜索输入框组件。 by [@ruibaby](https://github.com/ruibaby) in [#4182](https://github.com/halo-dev/halo/pull/4182)
    
-   重构 Console 端评论数据列表的筛选项 UI 和逻辑。 by [@ruibaby](https://github.com/ruibaby) in [#4195](https://github.com/halo-dev/halo/pull/4195)
    
-   重构 Console 端附件数据列表的筛选项 UI 和逻辑。 by [@ruibaby](https://github.com/ruibaby) in [#4194](https://github.com/halo-dev/halo/pull/4194)
    
-   重构 Console 端文章数据列表的筛选项 UI 和逻辑。 by [@ruibaby](https://github.com/ruibaby) in [#4193](https://github.com/halo-dev/halo/pull/4193)
    
-   重构 Console 端系统设置页面的路由结构。 by [@ruibaby](https://github.com/ruibaby) in [#4196](https://github.com/halo-dev/halo/pull/4196)
    
-   Console 端的文章管理列表支持在地址栏记录筛选条件。 by [@ruibaby](https://github.com/ruibaby) in [#4102](https://github.com/halo-dev/halo/pull/4102)
    
-   Console 端的附件管理列表支持在地址栏记录筛选条件。 by [@ruibaby](https://github.com/ruibaby) in [#4210](https://github.com/halo-dev/halo/pull/4210)
    
-   Console 端的评论管理列表支持在地址栏记录筛选条件。 by [@ruibaby](https://github.com/ruibaby) in [#4209](https://github.com/halo-dev/halo/pull/4209)
    
-   Console 端的页面管理列表支持在地址栏记录筛选条件。 by [@ruibaby](https://github.com/ruibaby) in [#4208](https://github.com/halo-dev/halo/pull/4208)
    
-   优化去除 HTML 重复 Meta 标签的正则表达式。 by [@guqing](https://github.com/guqing) in [#4235](https://github.com/halo-dev/halo/pull/4235)
    
-   优化 Console 端对异步数据轮询的间隔时间。 by [@ruibaby](https://github.com/ruibaby) in [#4246](https://github.com/halo-dev/halo/pull/4246)
    
-   Console 端关于用户密码输入的部分添加基本的验证。 by [@ruibaby](https://github.com/ruibaby) in [#4257](https://github.com/halo-dev/halo/pull/4257)
    
-   移除 Console 端用户编辑表单中用户名的校验规则，防止旧版本 Halo 升级之后无法修改资料。 by [@ruibaby](https://github.com/ruibaby) in [#4276](https://github.com/halo-dev/halo/pull/4276)
    
-   在 Console 的登录页面添加返回到前台的链接。 by [@ruibaby](https://github.com/ruibaby) in [#4262](https://github.com/halo-dev/halo/pull/4262)
    
-   重构 Console 的分页组件，以支持显示数据总条数。 by [@ruibaby](https://github.com/ruibaby) in [#4303](https://github.com/halo-dev/halo/pull/4303)
    
-   在安装主题和插件的界面中添加下载源的提示。 by [@ruibaby](https://github.com/ruibaby) in [#4314](https://github.com/halo-dev/halo/pull/4314)
    
-   优化刷新搜索引擎索引的文案。 by [@cetr](https://github.com/cetr) in [#4334](https://github.com/halo-dev/halo/pull/4334) [#4335](https://github.com/halo-dev/halo/pull/4335)
    

### 问题修复

-   修复生产模式下插件安装时的位置信息为绝对路径会影响迁移的问题。 by [@guqing](https://github.com/guqing) in [#4179](https://github.com/halo-dev/halo/pull/4179)
    
-   修复插件被卸载时 delete 生命周期方法不会被触发的问题。 by [@guqing](https://github.com/guqing) in [#4241](https://github.com/halo-dev/halo/pull/4241)
    
-   修复由于多线程环境下导致的插件卸载时的路由异常问题。 by [@guqing](https://github.com/guqing) in [#4245](https://github.com/halo-dev/halo/pull/4245)
    
-   修复编辑文章时，原来的图片尺寸被自动修改的问题。 by [@ruibaby](https://github.com/ruibaby) in [#4264](https://github.com/halo-dev/halo/pull/4264)
    
-   修复 Console 的评论有新回复时，无法展开回复列表的问题。 by [@ruibaby](https://github.com/ruibaby) in [#4305](https://github.com/halo-dev/halo/pull/4305)
    
-   修复用户详情页面切换用户之后，数据不更新的问题。 by [@ruibaby](https://github.com/ruibaby) in [#4321](https://github.com/halo-dev/halo/pull/4321)
    
-   修复页面取消发布后访问仍然出现页面未找到错误。 by [@JohnNiang](https://github.com/JohnNiang) in [#4318](https://github.com/halo-dev/halo/pull/4318)
    
-   修复新建文章发布或者保存之后，浏览器中的内容缓存没有清空的问题。 by [@ruibaby](https://github.com/ruibaby) in [#4316](https://github.com/halo-dev/halo/pull/4316)
    
-   修复 Console 端在最后一个附件点击下一项按钮时得到空结果的问题。 by [@Erzbir](https://github.com/Erzbir) in [#4328](https://github.com/halo-dev/halo/pull/4328)
    
-   修复预览附件点击 `下一个` 或者 `上一个` 翻页后，预览页面不正常刷新的问题。 by [@Erzbir](https://github.com/Erzbir) in [#4331](https://github.com/halo-dev/halo/pull/4331)
    
-   修复创建角色时，如果基于某个角色创建，实际权限可能不会更新的问题。 by [@ruibaby](https://github.com/ruibaby) in [#4333](https://github.com/halo-dev/halo/pull/4333)
    

### 依赖更新

-   升级 Spring Boot 至 3.1.2。 by [@JohnNiang](https://github.com/JohnNiang) in [#4284](https://github.com/halo-dev/halo/pull/4284)
    
-   升级预设插件版本。 by [@JohnNiang](https://github.com/JohnNiang) in [#4287](https://github.com/halo-dev/halo/pull/4287)
    

### 开发者相关

-   Console 端插件详情选项卡支持通过插件扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4041](https://github.com/halo-dev/halo/pull/4041)
    
-   Console 端全局注册 AnnotationsForm 组件，以暴露给插件使用。 by [@ruibaby](https://github.com/ruibaby) in [#4212](https://github.com/halo-dev/halo/pull/4212)
    
-   优化评论扩展点的使用方式。 by [@guqing](https://github.com/guqing) in [#4249](https://github.com/halo-dev/halo/pull/4249)
    
-   为 Console 端的 FormKit 表单添加附件策略和分组的输入类型。 by [@LIlGG](https://github.com/LIlGG) in [#4258](https://github.com/halo-dev/halo/pull/4258)
    
-   提供用户名密码认证扩展。 by [@JohnNiang](https://github.com/JohnNiang) in [#4265](https://github.com/halo-dev/halo/pull/4265)
    
-   按条件渲染评论组件以简化主题端对评论组件是否显示的条件控制。 by [@guqing](https://github.com/guqing) in [#4271](https://github.com/halo-dev/halo/pull/4271)
    
-   Extension 查询接口支持排序参数。 by [@JohnNiang](https://github.com/JohnNiang) in [#4274](https://github.com/halo-dev/halo/pull/4274)
    
-   Console 端的 Dialog 组件添加 showCancel 属性用于控制是否显示取消按钮。 by [@ruibaby](https://github.com/ruibaby) in [#4302](https://github.com/halo-dev/halo/pull/4302)
