# 初始化功能优化，Halo 2.9.0 发布

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

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

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

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

这个版本主要以功能优化和问题修复为主，其中包括初始化流程优化、备份恢复功能优化等。

## 亮点更新

### 支持在初始化页面创建管理员

从 2.9 版本开始，Halo 支持直接在系统初始化页面进行管理员设置，不需要在部署的时候通过参数指定。

![2.9-setup.png](https://www.halo.run/upload/2.9-setup.png)

### 备份恢复功能更新

1.  支持恢复完成后自动重启，不再需要手动在服务器重启 Halo 。
    
2.  支持通过文件链接的形式进行恢复。
    
3.  支持选择已有备份进行恢复。
    

![2.9-restore-by-remote-download.png](https://www.halo.run/upload/2.9-restore-by-remote-download.png)

![2.9-restore-by-backup.png](https://www.halo.run/upload/2.9-restore-by-backup.png)

## 完整更新日志

### 新特性

-   改进系统初始化流程，支持在初始化页面创建管理员。 by [@guqing](https://github.com/guqing) in [#4306](https://github.com/halo-dev/halo/pull/4306)
    
-   系统恢复完成之后支持自动重启 Halo 。 by [@JohnNiang](https://github.com/JohnNiang) in [#4361](https://github.com/halo-dev/halo/pull/4361)
    
-   登录后支持在主题端展示作者的私有文章。 by [@guqing](https://github.com/guqing) in [#4412](https://github.com/halo-dev/halo/pull/4412)
    
-   系统恢复功能支持通过远程文件链接恢复。 by [@ruibaby](https://github.com/ruibaby) in [#4507](https://github.com/halo-dev/halo/pull/4507) [@JohnNiang](https://github.com/JohnNiang) in [#4474](https://github.com/halo-dev/halo/pull/4474)
    
-   系统恢复功能支持选择已有备份进行系统恢复。 by [@ruibaby](https://github.com/ruibaby) in [#4511](https://github.com/halo-dev/halo/pull/4511)
    
-   Console 端支持通过快捷键保存文章。 by [@GodlessLiu](https://github.com/GodlessLiu) in [#4510](https://github.com/halo-dev/halo/pull/4510)
    
-   新增西班牙語（ES）翻译。 by [@yosoyjaff](https://github.com/yosoyjaff) in [#4460](https://github.com/halo-dev/halo/pull/4460)
    

### 功能优化

-   在用户列表中禁用选中当前用户。 by [@LIlGG](https://github.com/LIlGG) in [#4355](https://github.com/halo-dev/halo/pull/4355)
    
-   优化 Console 端表单验证，支持自动滚动至未通过的表单项。 by [@LIlGG](https://github.com/LIlGG) in [#4358](https://github.com/halo-dev/halo/pull/4358)
    
-   优化 Console 端插件管理列表的性能。 by [@ruibaby](https://github.com/ruibaby) in [#4410](https://github.com/halo-dev/halo/pull/4410)
    
-   将元数据表单的值更改为非必填。 by [@LIlGG](https://github.com/LIlGG) in [#4419](https://github.com/halo-dev/halo/pull/4419)
    
-   对 Console 重定向链接进行编码。 by [@LIlGG](https://github.com/LIlGG) in [#4423](https://github.com/halo-dev/halo/pull/4423)
    
-   修复上传文件时由于外部异常而导致进度条不变的问题。 by [@LIlGG](https://github.com/LIlGG) in [#4431](https://github.com/halo-dev/halo/pull/4431)
    
-   为 FormKit 的 password 类型输入框添加统一的显示/隐藏明文按钮。 by [@ruibaby](https://github.com/ruibaby) in [#4434](https://github.com/halo-dev/halo/pull/4434)
    
-   增强默认编辑器在文章内容过大时的性能。 by [@gengxiaoxiaoxin](https://github.com/gengxiaoxiaoxin) in [#4445](https://github.com/halo-dev/halo/pull/4445)
    
-   用户列表搜索支持按用户名搜索。 by [@LIlGG](https://github.com/LIlGG) in [#4451](https://github.com/halo-dev/halo/pull/4451)
    
-   Console 端的 Tabs 组件支持通过鼠标滚动选项卡。 by [@ruibaby](https://github.com/ruibaby) in [#4453](https://github.com/halo-dev/halo/pull/4453)
    
-   优化本地搜索引擎。 by [@JohnNiang](https://github.com/JohnNiang) in [#4456](https://github.com/halo-dev/halo/pull/4456)
    
-   减少内容编辑对本地缓存依赖，支持内容自动保存至服务端。 by [@LIlGG](https://github.com/LIlGG) in [#4458](https://github.com/halo-dev/halo/pull/4458)
    
-   移除 Console 端启动/停止插件的确认弹框。 by [@ruibaby](https://github.com/ruibaby) in [#4472](https://github.com/halo-dev/halo/pull/4472)
    
-   移除 Console 端插件管理列表的分页功能，默认列表出所有安装的插件。 by [@ruibaby](https://github.com/ruibaby) in [#4473](https://github.com/halo-dev/halo/pull/4473)
    
-   Console 端附件管理的显示模式支持缓存到浏览器。 by [@GodlessLiu](https://github.com/GodlessLiu) in [#4477](https://github.com/halo-dev/halo/pull/4477)
    
-   Console 端的插件管理支持批量操作。 by [@ruibaby](https://github.com/ruibaby) in [#4482](https://github.com/halo-dev/halo/pull/4482)
    
-   重构 Console 端主题管理界面，支持通过插件扩展选项卡。 by [@ruibaby](https://github.com/ruibaby) in [#4505](https://github.com/halo-dev/halo/pull/4505)
    

### 问题修复

-   修复 AnnotationsForm 重复的 key 校验无效的问题。 by [@LIlGG](https://github.com/LIlGG) in [#4369](https://github.com/halo-dev/halo/pull/4369)
    
-   修复评论启用状态的主题模板变量名作用域不正确的问题。 by [@guqing](https://github.com/guqing) in [#4385](https://github.com/halo-dev/halo/pull/4385)
    
-   解决备份恢复时因文件小于 256KB 而导致接口卡住的问题。 by [@JohnNiang](https://github.com/JohnNiang) in [#4391](https://github.com/halo-dev/halo/pull/4391)
    
-   修复文章标题过长时，仪表盘的最近文章小部件的样式问题。 by [@GodlessLiu](https://github.com/GodlessLiu) in [#4416](https://github.com/halo-dev/halo/pull/4416)
    
-   修复 Console 端头像组件的图片更新问题。 by [@GodlessLiu](https://github.com/GodlessLiu) in [#4459](https://github.com/halo-dev/halo/pull/4459)
    
-   修复因备份数据状态不正常导致无法正常删除备份的问题。 by [@JohnNiang](https://github.com/JohnNiang) in [#4462](https://github.com/halo-dev/halo/pull/4462)
    
-   修复 Windows 系统上的插件路径问题。 by [@guqing](https://github.com/guqing) in [#4480](https://github.com/halo-dev/halo/pull/4480)
    
-   解决评论列表根据评论者条件筛选时为空的问题。 by [@LIlGG](https://github.com/LIlGG) in [#4481](https://github.com/halo-dev/halo/pull/4481)
    
-   修复主题和插件新增加的配置项默认值没有填充的问题。 by [@guqing](https://github.com/guqing) in [#4486](https://github.com/halo-dev/halo/pull/4486)
    
-   修复评论管理中审核状态筛选无效的问题。 by [@LIlGG](https://github.com/LIlGG) in [#4502](https://github.com/halo-dev/halo/pull/4502)
    
-   修复因重启后部分可被回收的资源一直处于删除中的状态。 by [@JohnNiang](https://github.com/JohnNiang) in [#4526](https://github.com/halo-dev/halo/pull/4526)
    

### 依赖更新

-   升级 SpringDoc 至 2.2.0。 by [@JohnNiang](https://github.com/JohnNiang) in [#4384](https://github.com/halo-dev/halo/pull/4384)
    
-   升级 FormKit 的依赖至 0.18.0。 by [@ruibaby](https://github.com/ruibaby) in [#4428](https://github.com/halo-dev/halo/pull/4428)
    
-   升级 Vue 至 3.3 以及相关的依赖。 by [@ruibaby](https://github.com/ruibaby) in [#4427](https://github.com/halo-dev/halo/pull/4427)
    
-   升级依赖 Lucene 至 9.7.0。 by [@JohnNiang](https://github.com/JohnNiang) in [#4479](https://github.com/halo-dev/halo/pull/4479)
    
-   升级依赖 Spring Boot 至 3.1.3。 by [@JohnNiang](https://github.com/JohnNiang) in [#4478](https://github.com/halo-dev/halo/pull/4478)
    
-   升级 Console 端上传组件（Uppy）相关依赖的版本。 by [@ruibaby](https://github.com/ruibaby) in [#4487](https://github.com/halo-dev/halo/pull/4487)
    
-   升级默认编辑器的版本。 by [@ruibaby](https://github.com/ruibaby) in [#4490](https://github.com/halo-dev/halo/pull/4490)
    
    -   图片支持修改 alt 属性。 by [@GodlessLiu](https://github.com/GodlessLiu) in [halo-sigs/richtext-editor#32](https://github.com/halo-sigs/richtext-editor/pull/32)
        
    -   拖拽修改图片大小的时候保持等比例。 by [@GodlessLiu](https://github.com/GodlessLiu) in [halo-sigs/richtext-editor#33](https://github.com/halo-sigs/richtext-editor/pull/33)
        
    -   优化在移动端下，编辑器右侧边栏的样式。 by [@ruibaby](https://github.com/ruibaby) in [halo-sigs/richtext-editor#35](https://github.com/halo-sigs/richtext-editor/pull/35)
        
    -   编辑器标题、段落及代码块增加 Tab 快捷键缩进。 by [@LIlGG](https://github.com/LIlGG) in [halo-sigs/richtext-editor#34](https://github.com/halo-sigs/richtext-editor/pull/34)
        

### 开发者相关

-   支持在插件中获取备份文件根目录。 by [@JohnNiang](https://github.com/JohnNiang) in [#4422](https://github.com/halo-dev/halo/pull/4422)
    
-   Console 端的文章和插件列表的操作按钮列表支持扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4452](https://github.com/halo-dev/halo/pull/4452)
    
-   重构 Console 端插件安装界面，支持通过插件扩展选项卡。 by [@ruibaby](https://github.com/ruibaby) in [#4461](https://github.com/halo-dev/halo/pull/4461)
    
-   Console 端全局注册 `AttachmentFileTypeIcon` 组件。 by [@longjuan](https://github.com/longjuan) in [#4489](https://github.com/halo-dev/halo/pull/4489)
    
-   Console 端的备份列表的操作按钮列表支持扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4508](https://github.com/halo-dev/halo/pull/4508)
    
-   修复 Console 端 Tabbar 组件默认类型的样式问题。 by [@ruibaby](https://github.com/ruibaby) in [#4521](https://github.com/halo-dev/halo/pull/4521)
    
-   Console 端的插件列表的显示字段支持扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4514](https://github.com/halo-dev/halo/pull/4514)
    
-   Console 主题管理列表项的操作按钮支持被插件扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4523](https://github.com/halo-dev/halo/pull/4523)
    
-   Console 端文章数据列表的显示字段支持通过插件扩展。 by [@ruibaby](https://github.com/ruibaby) in [#4528](https://github.com/halo-dev/halo/pull/4528)
