github halo-dev/halo v2.21.0-alpha.1
2.21.0-alpha.1

latest releases: v2.21.7, v2.21.6, v2.21.5...
pre-release3 months ago

⚠️ 提示

此版本为 2.21.0 的早期版本,不适用于生产环境。这个版本移除了一些过时 API 和一些不兼容改动,发布此版本的主要目的是为了可以让社区的插件和主题开发者提前适配。具体改动方案请查阅下方的适配列表和破坏性更新列表。

从 2.21.0 开始,Halo 开发环境的最低运行环境为 Java 21。

新特性

功能优化

  • 编辑器支持为链接设置 搜索引擎忽略链接关系。 by @Nimbus3009 in #7444
  • 用户搜索支持根据邮箱地址。 by @liuyiwuqing in #7441
  • 优化 Console 和 UC 中数据列表的 UI 在不同尺寸设备下的表现。 by @ruibaby in #7383

问题修复

  • 修复因 Locale 解析错误导致无法访问页面的问题。 by @JohnNiang in #7458

依赖更新

开发者相关

适配列表

VEntity 组件

此版本为了优化使用 VEntity 组件渲染的数据列表样式,引入了新的 VEntityContainer 组件,适配方式为在所有 VEntity 组件外使用
VEntityContainer 组件包裹,以下是具体步骤和示例:

升级 ⁠@halo-dev/components 包至 2.21.0 版本:

# 临时地址,等待 2.21.0 正式发布之后,可改为 @halo-dev/components@2.21.0
pnpm i https://pkg.pr.new/@halo-dev/components@7383

示例:

<script lang="ts" setup>
import { VEntity, VEntityContainer } from "@halo-dev/components"
</script>

<template>
  <VEntityContainer>
    <VEntity />
    <VEntity />
  </VEntityContainer>
</template>

完整更改方式可参考:https://github.com/halo-dev/plugin-feed/pull/66/files

破坏性更新

  • 移除过时类 run.halo.app.extension.router.selector.FieldCriteriaPredicateConverter
    run.halo.app.extension.router.selector.LabelCriteriaPredicateConverter,推荐用
    run.halo.app.extension.router.selector.SelectorConverter 替代。
  • 移除过时类 run.halo.app.search.SearchParam,推荐用 run.halo.app.search.SearchOption 替代。
  • 移除过时类 run.halo.app.search.post.PostDocrun.halo.app.search.post.PostHit,推荐用
    run.halo.app.search.HaloDocument 替代。
  • 移除 Plugin 过时字段 spec.pluginClass,推荐在插件定义文件中移除此字段。
  • 移除 Plugin 过时字段 spec.website,推荐使用 spec.homepage 替代。
  • 移除 Plugin 过时字段 spec.require,推荐使用 spec.requires 替代。
  • 移除 SystemSetting.AuthProvider 过时字段 enabled,已经由 SystemSetting.AuthProviderstates 字段替代。
  • 移除 run.halo.app.extension.ExtensionMatcher 过时方法 getGvkgetLabelSelectorgetFieldSelector
  • 移动方法 run.halo.app.extension.MetadataOperator#metadataDeepEquals
    run.halo.app.extension.MetadataOperator#equals
  • 移除 run.halo.app.extension.router.QueryParamBuildUtil 过时方法 buildParametersFromType,推荐使用
    org.springdoc.core.fn.builders.operation.Builder#parameter 替代。
  • 移除 run.halo.app.extension.router.SortableRequest 过时方法 toPredicate,推荐使用
    run.halo.app.extension.router.SortableRequest#toListOptions 替代。
  • 移除 run.halo.app.extension.router.selector.SelectorUtil 过时方法 labelSelectorsToPredicate
    fieldSelectorToPredicatelabelAndFieldSelectorToPredicate,推荐使用
    run.halo.app.extension.router.selector.SelectorUtil#labelAndFieldSelectorToListOptions 替代。
  • 移除 run.halo.app.theme.finders.TagFinder 过时方法 list(Integer, Integer, Predicate, Predicate),推荐使用
    run.halo.app.theme.finders.TagFinder#list(Integer, Integer) 替代。
  • 移除 run.halo.app.plugin.BasePlugin 过时构造函数 BasePlugin(PluginWrapper),推荐使用 BasePlugin(PluginContext)
    替代。
  • 移除接口 GET&PUT /apis/api.console.halo.run/v1alpha1/plugins/{name}/config,推荐使用
    GET&PUT /apis/api.console.halo.run/v1alpha1/plugins/{name}/json-config 替代。
  • 移除接口 GET&PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/config,推荐使用
    GET&PUT /apis/api.console.halo.run/v1alpha1/themes/{name}/json-config 替代。
  • 移除接口 POST /apis/api.halo.run/v1alpha1/indices/post,推荐使用 POST /apis/api.halo.run/v1alpha1/indices/-/search
    替代。
  • 移除接口 POST /apis/api.console.halo.run/v1alpha1/indices/post,推荐使用
    POST /apis/api.console.halo.run/v1alpha1/indices/-/rebuild 替代。

最后,请确保更新 plugin.yaml 中的 requires 字段为 >=2.21.0

Full Changelog: v2.20.21...v2.21.0-alpha.1

Don't miss a new halo release

NewReleases is sending notifications on new releases.