# Halo 1.4.0 发布

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

## 新特性

-   支持静态存储重命名和修改文件内容。[#819](https://github.com/halo-dev/halo/pull/819)
    
-   所有附件列表均支持右键复制图片链接。[halo-dev/console#180](https://github.com/halo-dev/console/pull/180)
    
-   开发者选项中的实时日志支持自动滚动到最新的日志。
    
-   在线下载主题支持选择分支和 release。[#515](https://github.com/halo-dev/halo/issues/515) [#592](https://github.com/halo-dev/halo/issues/592) [#835](https://github.com/halo-dev/halo/pull/835)
    
-   评论内容支持显示 html 文本。[halo-dev/console#222](https://github.com/halo-dev/console/pull/222)
    
-   文章新增 `wordCount` 字段，用于统计字数。[#965](https://github.com/halo-dev/halo/pull/965)
    
-   文章编辑支持自动将文章标题的拼音设置为别名。[halo-dev/console#235](https://github.com/halo-dev/console/pull/235)
    
-   重构登录页面，并且支持在登录状态失效后弹出登录框，而不是直接跳转到登录页面，防止正在编辑中的文章丢失。[halo-dev/console#238](https://github.com/halo-dev/console/pull/238)
    
-   预览草稿的时候，不再会增加访问量。[#834](https://github.com/halo-dev/halo/pull/834)
    
-   Content API 支持使用文章或者页面的 slug 获取文章信息。[#1044](https://github.com/halo-dev/halo/pull/1044)
    

## 功能优化

-   为部分表单添加表单验证。
    
-   发布文章时采用实际点击发布按钮时的时间。[halo-dev/console#160](https://github.com/halo-dev/console/pull/160)
    
-   添加 renderer meta 标签，让部分双核浏览器强制使用新一代内核，而不是 IE 内核导致页面无法正常渲染。[halo-dev/console#207](https://github.com/halo-dev/console/pull/207)
    
-   减弱所有动画效果。[halo-dev/console#213](https://github.com/halo-dev/console/pull/213)
    
-   移除部分操作的吐司提示，改为直接在按钮上显示操作结果。[halo-dev/console#216](https://github.com/halo-dev/console/pull/216)
    
-   优化大量不合理的代码。[halo-dev/console#213](https://github.com/halo-dev/console/pull/213) [halo-dev/console#215](https://github.com/halo-dev/console/pull/215)
    
-   移除 fastjson 依赖。[#871](https://github.com/halo-dev/halo/pull/871)
    
-   重构主题目录扫描，允许当前没有激活中的主题。[#869](https://github.com/halo-dev/halo/pull/869)
    
-   移除在开发者选项中重启应用的功能。[#917](https://github.com/halo-dev/halo/pull/917)
    
-   移除 Token 不存在时抛出的异常。[#962](https://github.com/halo-dev/halo/pull/962)
    
-   优化 Markdown 导入功能。[#977](https://github.com/halo-dev/halo/pull/977)
    
-   修复文章管理页面刷新后分页显示不正确的问题。[halo-dev/console#231](https://github.com/halo-dev/console/pull/231)
    
-   修复文件上传组件无法同时上传多个文件的问题。[halo-dev/console#234](https://github.com/halo-dev/console/pull/234)
    
-   修复异常图片上传的时候，没有捕获异常的问题。[#1025](https://github.com/halo-dev/halo/pull/1025)
    
-   优化文章编辑提示未保存弹窗的时机。[halo-dev/console#242](https://github.com/halo-dev/console/pull/242)
    
-   移除开发者选项中修改配置文件和重启服务的功能。[halo-dev/console#244](https://github.com/halo-dev/console/pull/244)
    
-   优化主题管理页面的布局。[halo-dev/console#245](https://github.com/halo-dev/console/pull/245)
    
-   优化远程下载主题的体验。[halo-dev/console#249](https://github.com/halo-dev/console/pull/249)
    
-   优化博客设置页面的布局。[halo-dev/console#251](https://github.com/halo-dev/console/pull/251)
    

## 问题修复

-   修复取消全局绝对路径导致加密文章无法正确查看的问题。[#785](https://github.com/halo-dev/halo/issues/785) [#854](https://github.com/halo-dev/halo/pull/854)
    
-   修复 token 无法正确失效的问题。[halo-dev/console#129](https://github.com/halo-dev/console/pull/129)
    
-   修复附件不存在时调用删除接口抛异常的问题。[#951](https://github.com/halo-dev/halo/pull/951)
    
-   修复 content api 中查询单篇文章或页面时，没有发出浏览量增加事件的问题。[#981](https://github.com/halo-dev/halo/pull/981)
    
-   修复自动生成的文章摘要中清除了空格的问题。[#1003](https://github.com/halo-dev/halo/pull/1003)
    
-   修复文章页面渲染耗时过长的问题。[#1008](https://github.com/halo-dev/halo/pull/1008)
    
-   修复主题版本校验没有处理 beta 形式的版本号，从而导致无法更新或者安装主题的问题。[#1011](https://github.com/halo-dev/halo/pull/1011)
    
-   修复文章管理页面刷新后分页显示不正确的问题。[halo-dev/console#231](https://github.com/halo-dev/console/pull/231)
    
-   修复文件上传组件无法同时上传多个文件的问题。[halo-dev/console#234](https://github.com/halo-dev/console/pull/234)
    
-   修复异常图片上传的时候，没有捕获异常的问题。[#1025](https://github.com/halo-dev/halo/pull/1025)
    
-   修复退出登录和初始化引导页面的部分问题。[halo-dev/console#239](https://github.com/halo-dev/console/pull/239) [halo-dev/console#240](https://github.com/halo-dev/console/pull/240)
    
-   修复网站备份的时候，上级目录不存在导致备份异常的问题。[#1056](https://github.com/halo-dev/halo/pull/1056)
    
-   修复无法上传 `tar.gz` 类型文件的问题。[#1057](https://github.com/halo-dev/halo/pull/1057)
    
-   修复某些情况下主题设置保存失败的问题。[#1070](https://github.com/halo-dev/halo/pull/1070)
    
-   修复上传附件或者主题时，由于部分系统会定时清理临时目录，导致上传失败的问题。
    

## 升级步骤

1.  停止运行 Halo：`service halo stop`。
    
2.  备份数据：`cp -r ~/.halo ~/.halo.bak`。
    
3.  重命名（备份）旧运行包：`mv halo-latest.jar halo-latest.jar.bak`。
    
4.  下载新运行包：`wget https://dl.halo.run/release/halo-1.4.0.jar -O halo-latest.jar`。
    
5.  运行：`service halo start`。
    

## 注意事项

1.  更新前不要忘了备份数据，不管你是以什么方式部署的，都请备份 `~/.halo`，当然，如果你使用 docker 部署，并修改了映射路径的话，就备份你的映射路径。
    
2.  如果有使用 CDN 全站加速，请更新完毕后，刷新全站缓存，并清空浏览器缓存。
    

## 相关链接

-   [https://github.com/halo-dev/halo/releases/tag/v1.4.0](https://github.com/halo-dev/halo/releases/tag/v1.4.0)
    
-   [https://bbs.halo.run/d/999-halo-140](https://bbs.halo.run/d/999-halo-140)
