# 支持集成外部编辑器，Halo 2.1.0 发布

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

距离 Halo 2.0 正式版发布已经过去了一个月。在这一个月的时间里，我们接受了大量的反馈和建议，2.1.0 我们一共优化了 20 多项问题，带来了 30 多项的功能更新和优化。在此感谢大家的反馈和参与。

## 主要亮点更新

### 支持集成外部编辑器

2.0 正式版发布的时候，我们仅提供了默认的富文本编辑器，但考虑到部分用户对 Markdown 文本编辑器有较强的需求，所以在 2.1.0 我们提供了集成外部编辑器的能力，并且由官方维护了两个 Markdown 格式编辑器的插件，希望能够满足绝大部分文档编辑的需求。此外，这个扩展编辑器的能力不仅仅可以集成 Markdown 格式的编辑器，也可以集成其他文本格式的编辑器，比如 Latex、AsciiDoc 等，期待社区的参与。

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

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

### 支持为资源设置元数据

这个功能简单来说就是为部分业务添加扩展字段的支持，属于我们 1.x 功能的回归，但做了可视化的增强，目前可以支持通过插件或者主题来为各个业务添加额外的表单，也可以由使用者自行以键值对的形式添加字段。主题作者可以通过这个功能为各种内容扩展功能。

![annotation-setting](https://www.halo.run/upload/2022/12/annotation-setting.png)

### 增加作者归档页面

Halo 2.0 最重要的一个功能就是支持了多用户。在这个版本我们对其进行了额外的增强，为主题端提供了作者归档的页面，可以通过 `/authors/{author}` 来访问具体作者的内容。

![author-page](https://www.halo.run/upload/2022/12/author-page.png)

### 支持原生的 MariaDB 驱动

在 2.1.0 我们开始支持原生的 MariaDB 数据库驱动。所以截至目前 2.1.0 版本，我们支持 `PostgreSQL`、`MySQL`、`MariaDB`、`H2 Database` 四种数据库。

## 完整变更日志

### **新特性**

-   支持重置主题和插件的设置选项。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#777](https://github.com/halo-dev/console/pull/777) [**@guqing**](https://github.com/guqing) in [#2964](https://github.com/halo-dev/halo/pull/2964)
    
-   Console 端支持扩展集成其他编辑器。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#781](https://github.com/halo-dev/console/pull/781)
    
-   Console 端支持设置 Favicon。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#788](https://github.com/halo-dev/console/pull/788)
    
-   为部分模型提供元数据设置的设置。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#770](https://github.com/halo-dev/console/pull/770) [**@guqing**](https://github.com/guqing) in [#3028](https://github.com/halo-dev/halo/pull/3028) [#3076](https://github.com/halo-dev/halo/pull/3076)
    
-   支持在工作目录添加自定义配置。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#2935](https://github.com/halo-dev/halo/pull/2935)
    
-   主题端支持作者归档页面。 by [**@guqing**](https://github.com/guqing) in [#2923](https://github.com/halo-dev/halo/pull/2923)
    
-   支持命令行参数启动 Halo。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#2942](https://github.com/halo-dev/halo/pull/2942)
    
-   主题端支持异常模板页面。 by [**@guqing**](https://github.com/guqing) in [#2925](https://github.com/halo-dev/halo/pull/2925)
    
-   CategoryFinder 添加根据分类查询子分类树结构的方法。 by [**@chengfeiyue**](https://github.com/chengfeiyue) in [#2995](https://github.com/halo-dev/halo/pull/2995)
    
-   添加原生 MariaDB 驱动的支持。 by [**@codychau**](https://github.com/codychau) in [#2787](https://github.com/halo-dev/halo/pull/2787)
    
-   支持系统异常的多语言输出。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3042](https://github.com/halo-dev/halo/pull/3042)
    
-   菜单项支持设置打开方式。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#805](https://github.com/halo-dev/console/pull/805) [#3072](https://github.com/halo-dev/halo/pull/3072)
    
-   完善静态资源的缓存策略。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3074](https://github.com/halo-dev/halo/pull/3074)
    

### **功能优化**

-   重构访问量统计逻辑，修复文章访问量无法迁移的问题。 by [**@guqing**](https://github.com/guqing) in [#2870](https://github.com/halo-dev/halo/pull/2870)
    
-   Console 端登录页面支持自动聚焦输入框。 by [**@Aanko**](https://github.com/Aanko) in [halo-dev/console#742](https://github.com/halo-dev/console/pull/742)
    
-   优化 Console 端接口请求异常提示。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#744](https://github.com/halo-dev/console/pull/744)
    
-   优化主题升级入口的文字。 by [**@Joydevelop**](https://github.com/Joydevelop) in [halo-dev/console#747](https://github.com/halo-dev/console/pull/747)
    
-   优化 Console 端的主题和插件详情页面切换选项卡时的页面闪动问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#748](https://github.com/halo-dev/console/pull/748)
    
-   完善 Console 端用户角色的相关逻辑。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#749](https://github.com/halo-dev/console/pull/749)
    
-   Console 端为部分图标按钮添加操作提示，提升可访问性。 by [**@Aanko**](https://github.com/Aanko) in [halo-dev/console#745](https://github.com/halo-dev/console/pull/745)
    
-   优化 Console 端上传组件的异常提示信息。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#769](https://github.com/halo-dev/console/pull/769)
    
-   禁止 Console 端部分表单使用 Enter 提交，统一组合键（Ctrl + Enter）。 by [**@wzrove**](https://github.com/wzrove) in [halo-dev/console#766](https://github.com/halo-dev/console/pull/766)
    
-   Console 端的主题管理列表添加启用和升级的支持。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#774](https://github.com/halo-dev/console/pull/774)
    
-   优化 Console 端数据列表的操作按钮样式。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#780](https://github.com/halo-dev/console/pull/780)
    
-   优化 Console 端的插件卸载选项布局。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#779](https://github.com/halo-dev/console/pull/779)
    
-   优化 Console 端状态提示的样式。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#782](https://github.com/halo-dev/console/pull/782)
    
-   完善 Console 端的部分操作反馈提示。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#785](https://github.com/halo-dev/console/pull/785)
    
-   优化菜单和菜单项的编辑表单标题文字。 by [**@chengfeiyue**](https://github.com/chengfeiyue) in [halo-dev/console#794](https://github.com/halo-dev/console/pull/794)
    
-   优化 Console 端文章管理列表的布局，修复当分类设置过多时的样式问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#789](https://github.com/halo-dev/console/pull/789)
    
-   重构 Console 端文章和自定义页面的设置表单布局，支持提交时验证表单。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#791](https://github.com/halo-dev/console/pull/791)
    
-   优化 Console 端的用户和角色列表，如果包含正在删除的内容会自动刷新。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#797](https://github.com/halo-dev/console/pull/797)
    
-   重构 Console 端角色编辑的表单，取消多选项卡的设计。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#795](https://github.com/halo-dev/console/pull/795)
    
-   Console 端的评论回复 Emoji 组件数据改为异步加载，优化整体的加载性能。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#798](https://github.com/halo-dev/console/pull/798)
    
-   Console 端的默认编辑器改为异步加载，优化整体的加载性能。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#800](https://github.com/halo-dev/console/pull/800)
    
-   优化 Console 端上传附件的功能，支持缓存选择的分组和策略。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#784](https://github.com/halo-dev/console/pull/784)
    
-   移除 Console 端使用 yaml 编辑用户信息的功能。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#799](https://github.com/halo-dev/console/pull/799)
    
-   归档数据的月份改为按月降序。 by [**@liaocp666**](https://github.com/liaocp666) in [#2959](https://github.com/halo-dev/halo/pull/2959)
    
-   持久化并归档历史日志。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3021](https://github.com/halo-dev/halo/pull/3021)
    

### **问题修复**

-   修复 Console 端无法正常创建自定义链接类型菜单项的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#743](https://github.com/halo-dev/console/pull/743)
    
-   修复 Console 端激活主题之后页面没有更新数据的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#746](https://github.com/halo-dev/console/pull/746)
    
-   修复在 Console 端停止插件时，仍然获取设置选项导致显示失败提示的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#750](https://github.com/halo-dev/console/pull/750)
    
-   修复 Console 端文章设置中的发布时间为空字符串时，无法保存的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#763](https://github.com/halo-dev/console/pull/763)
    
-   修复 Console 端默认编辑器的嵌入网页在编辑文章时无法回显的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#773](https://github.com/halo-dev/console/pull/773)
    
-   修复 Console 端系统设置页面切换选项卡无法正常加载表单的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#787](https://github.com/halo-dev/console/pull/787)
    
-   修复首次初始化之后，Console 没有加载已激活主题的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#790](https://github.com/halo-dev/console/pull/790)
    
-   修复因文章过长导致无法保存数据的问题。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#2833](https://github.com/halo-dev/halo/pull/2833)
    
-   修复文章列表查询时的类型转换错误。 by [**@guqing**](https://github.com/guqing) in [#2854](https://github.com/halo-dev/halo/pull/2854)
    
-   修复每个角色都显示系统保留标签的问题。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#2865](https://github.com/halo-dev/halo/pull/2865)
    
-   修复自定义页面没有统计访问量的问题。 by [**@guqing**](https://github.com/guqing) in [#2918](https://github.com/halo-dev/halo/pull/2918)
    
-   修改 HTTP 请求体最大字节数的限制，修复保存大内容文章异常的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [#2936](https://github.com/halo-dev/halo/pull/2936)
    
-   修复插件开发模式下后续增加的 fixedPluginPath 项无法被加载的问题。 by [**@guqing**](https://github.com/guqing) in [#2941](https://github.com/halo-dev/halo/pull/2941)
    
-   修复插件 Logo 为相对路径时先启用再停后就无法加载 Logo 的问题。 by [**@guqing**](https://github.com/guqing) in [#2940](https://github.com/halo-dev/halo/pull/2940)
    
-   修复开启评论审核的情况下无法显示评论回复的问题。 by [**@minliacom**](https://github.com/minliacom) in [#2954](https://github.com/halo-dev/halo/pull/2954)
    
-   解决访问分析工具无法显示 referer 的问题。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#2972](https://github.com/halo-dev/halo/pull/2972)
    
-   修复主题升级后没有清理主题引擎缓存的问题。 by [**@minliacom**](https://github.com/minliacom) in [#2970](https://github.com/halo-dev/halo/pull/2970)
    
-   修复编译为可执行 JAR 之后运行无法初始化主题的问题。 by [**@minliacom**](https://github.com/minliacom) in [#2991](https://github.com/halo-dev/halo/pull/2991)
    
-   修复附件权限定义的错误。 by [**@JohnNiang**](https://github.com/JohnNiang) in [#3024](https://github.com/halo-dev/halo/pull/3024)
    
-   修复 Console 端已登录用户无法访问个人资料页面的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#796](https://github.com/halo-dev/console/pull/796) [**@JohnNiang**](https://github.com/JohnNiang) in [#3067](https://github.com/halo-dev/halo/pull/3067)
    
-   修复 Console 端保存文章设置导致发布时间丢失的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#807](https://github.com/halo-dev/console/pull/807)
    
-   修复 Console 端在 Safari 浏览器登录之后无反应的问题。 by [**@ruibaby**](https://github.com/ruibaby) in [halo-dev/console#804](https://github.com/halo-dev/console/pull/804)
    

### **重要变更**

-   HaloPluginManager 移除 getRootApplicationContext 方法。 by [**@guqing**](https://github.com/guqing) in [#2949](https://github.com/halo-dev/halo/pull/2949)
    

### **依赖更新**

-   升级 Spring Boot 至 3.0.1。 by [**@minliacom**](https://github.com/minliacom) in [#3031](https://github.com/halo-dev/halo/pull/3031)
    
-   更新默认主题的版本为 1.1.1。 by [**@ruibaby**](https://github.com/ruibaby) in [#3082](https://github.com/halo-dev/halo/pull/3082)
