#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
优化系统角色模板配置
- 认证用户仅具有名为 system-states 的 ConfigMap 查看权限而非所有 ConfigMap查看权限
- 主题和插件的管理权限目前需要单独勾选 ConfigMap 和 Setting 的权限才可以看到表单和值
#### Which issue(s) this PR fixes:
Fixes#2523
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
重构插件反向代理注册方式
#### Which issue(s) this PR fixes:
Fixes#2520
#### Special notes for your reviewer:
How to test:
1. clone 项目 https://github.com/halo-sigs/plugin-comment-widget 后 build 一个 jar
2. 将该 jar 作为一个插件安装到系统并启用它
3. 访问插件提供的反向代理资源
```
curl --location --request GET 'http://localhost:8090/assets/PluginCommentWidget/static/comment-widget.iife.js'
```
期望得到结果
4. 停用插件,重复 Step 3,期望得到 404
5. 重复数次 Step 3-4 均与期望相同即可
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
BasePlugin 持有了一个当前插件的 PluginApplicationContext 当插件停止后重新启用会获取到旧的 PluginApplicationContext,之前之所以这样写的目的只是插件的这个 BasePlugin 不支持依赖注入,目前已经支持所以不在这样解决问题
日志:
```
Caused by: java.lang.IllegalStateException: run.halo.app.plugin.PluginApplicationContext@6baf2671 has been closed already
at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1125) ~[spring-context-6.0.0-M5.jar:6.0.0-M5]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1158) ~[spring-context-6.0.0-M5.jar:6.0.0-M5]
at run.halo.app.plugin.SpringExtensionFactory.create(SpringExtensionFactory.java:102) ~[classes/:2.0.0-alpha.1]
at org.pf4j.ExtensionWrapper.getExtension(ExtensionWrapper.java:37) ~[pf4j-3.7.0.jar:3.7.0]
at org.pf4j.AbstractPluginManager.getExtensions(AbstractPluginManager.java:971) ~[pf4j-3.7.0.jar:3.7.0]
at run.halo.app.plugin.HaloPluginManager.getExtensions(HaloPluginManager.java:118) ~[classes/:2.0.0-alpha.1]
at run.halo.app.plugin.ExtensionComponentsFinder.getExtensions(ExtensionComponentsFinder.java:36) ~[classes/:2.0.0-alpha.1]
at run.halo.app.theme.dialect.CommentElementTagProcessor.doProcess(CommentElementTagProcessor.java:49) ~[classes/:2.0.0-alpha.1]
at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:918) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.StandaloneElementTag.beHandled(StandaloneElementTag.java:228) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:1204) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.StandaloneElementTag.beHandled(StandaloneElementTag.java:228) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:136) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:592) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.0.M2.jar:3.1.0.M2]
at run.halo.app.theme.engine.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:202) ~[classes/:2.0.0-alpha.1]
at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.publisher.Mono.subscribe(Mono.java:4321) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.0-M4.jar:3.5.0-M4]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
```
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
how to test:
1. 安装一个插件
2. 启用它再停止它,如此反复,没有抛出异常即可
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
Add MySQL script to support running Halo with MySQL database due to https://github.com/jasync-sql/jasync-sql/issues/311 has been resolved.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2464
#### Special notes for reviewers
Steps to test:
1. Start up MySQL. e.g.:
```yaml
version: '3.1'
services:
db:
image: mysql
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: openmysql
ports:
- 3306:3306
adminer:
image: adminer
restart: always
ports:
- 8080:8080
```
```bash
docker-compose -f mysql.yaml up
```
2. Start Halo with `mysql` profile. e.g.:
```bash
./gradlew bootRun --args="--spring.profiles.active=mysql"
```
3. Validate the functionality of Halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
修复主题端内容页访问量统计接口角色规则动词配置错误问题
#### Which issue(s) this PR fixes:
Fixes#2507
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/pull/2078 for more.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
因为目前暂时没有提供 JAR 包,所以移除 README 有关使用 JAR 包运行的文档。
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
修复文章和自定义页面的总评论数量统计取值错误
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind documentation
/milestone 2.0
#### What this PR does / why we need it:
更新 README。
See https://github.com/halo-dev/halo/issues/2410 for more
#### Special notes for your reviewer:
/hold
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
发布和更新文章及自定义页面时如果遇到乐观锁错误自动重试
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
补充角色模板
#### Which issue(s) this PR fixes:
Fixes#2342https://github.com/halo-dev/halo/issues/2391
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
将 spring boot 的版本从 3.0.0-M5 降级到 3.0.0-M5 以解决 swragger 无法使用的问题
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Fix the problem of granting role not taking effect.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2490
#### Special notes for your reviewer:
Steps to test:
1. Create an user
2. Grant a role for the user
3. Check the user list
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
创建评论时 hidden 字段默认为 false
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Fix the problem of changing password not exist before.
#### Which issue(s) this PR fixes:
Partial Fixes https://github.com/halo-dev/halo/issues/2427
#### Special notes for your reviewer:
Steps to test:
1. Create an user and change his/her password
2. Login with the user and the password
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
/kind api-change
#### What this PR does / why we need it:
自定义页面增加排序和筛选:
筛选:
关键词
状态
可见性
作者
排序:
发布时间
创建时间
#### Which issue(s) this PR fixes:
Fixes#2469
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
主题支持展示绝对路径位置
#### Which issue(s) this PR fixes:
Fixes#2461
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
主题 reload endpoint 增加对 theme.yaml 的 reload 操作
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
标签和分类的 status 中的 posts 字段不序列化,只提供文章 postCount 代替
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/kind api-change
/area core
/milestone 2.0
#### What this PR does / why we need it:
Support setting special characters on slug name of SinglePage.
#### Which issue(s) this PR fixes:
Partial Fixes https://github.com/halo-dev/halo/issues/2473
#### Special notes for your reviewer:
Steps to test:
1. Create single pags with slug name `中文`, `/a/b/c/d` or `a / b`
2. Request it with permalink generated by Halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
/area core
#### What this PR does / why we need it:
修改文章列表的默认排序规则,之前是按照创建时间(createTime)升序,现在改为降序。即最新创建的文章在前面。
#### Special notes for your reviewer:
测试方式:
连续创建多篇文章,检查前后台的文章排序是否是最新的在最前面。
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
完善系统设置表单的资源定义。
- 副标题的验证改为取消必填
- 优化主题路由规则显示名称
- 移除暂未实现的用户注册相关设置
- 代码注入设置的文案
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
完善系统设置表单的资源定义
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Fix empty listing of single page while using PostgreSQL.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
Add PostgreSQL script to support running Halo with PostgreSQL database. BTW, there was a weird issue (emty posts even if there are some posts created) while listing Post, and I fixed it in this PR.
#### Which issue(s) this PR fixes:
Partial Fixes https://github.com/halo-dev/halo/issues/2464
#### Special notes for reviewers
Steps to test:
1. Start up PostgreSQL. e.g.:
```yaml
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: openpostgresql
ports:
- 5432:5432
adminer:
image: adminer
restart: always
ports:
- 8080:8080
```
```bash
docker-compose -f postgresql.yaml up
```
2. Start Halo with `postgresql` profile. e.g.:
```bash
./gradlew bootRun --args="--spring.profiles.active=postgresql"
```
3. Validate the functionality of Halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
注册 permalink 到 Permalinker 时校验 permalink 是否已经存在,如果存在则记录错误日志且不向 PermalinkIndexer 添加记录
TODO:
- [ ] 后续增加事件功能后检查到 permalink 重复则发送记录事件的 event 来代替日志记录
#### Which issue(s) this PR fixes:
A part of #2454
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
文章自动摘要只从正在使用的已发布版本的内容中取得
#### Which issue(s) this PR fixes:
Fixes#2452
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
/kind api-change
#### What this PR does / why we need it:
- 新增主题端评论列表功能
- 新增 `<halo:comment />` html tag 用于扩展评论组件
- 插件可以实现 `CommentWidget` 扩展点来渲染评论组件 html 块,以替换 `<halo:comment />` 标签
#### Which issue(s) this PR fixes:
Fixes#2432
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
新增主题端评论列表功能
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.0
#### What this PR does / why we need it:
Encode path of attachment permalink instead of using URI#resolve methods directly.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2408
#### Special notes for reviewers
Steps to test:
1. Create a file with special name, e.g.: `hello world.txt`
2. Upload the file and see the permalink
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
/kind api-change
#### What this PR does / why we need it:
新增主题设置重载 API,调用此 API 会从主题文件中重新加载 settings.yaml 复盖原有记录,便于主题开发和测试
插件不需要此功能,配置了 `fixedPluginPath` 后每次重启都会加载新的配置项
#### Which issue(s) this PR fixes:
Fixes#2426
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
#### What this PR does / why we need it:
允许主题模板在 HTML 或 JavaScript 片段中使用表达式对象获得链接:
- `${#theme.assets('/js/main.js'))}`
- `${#theme.route('/categories')}`
#### Which issue(s) this PR fixes:
Fixes#2435
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
Support configuring console location to access console. By default, `classpath:/console/` location will be used. If anyone want to debug locally, you can configure the console properties as following:
```yaml
halo:
console:
location: file:/home/xxx/path/to/halo-admin/dist/ # The trailing slash is required or it will be treated with a file instead of a folder.
```
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
文章列表新增更过的查询条件
- publishPhase 状态
- visible 可见性
- keyword 关键词
新增排序(sort)(可逆序 sortOrder)
- 创建时间(默认创建时间逆序)
- 发布时间
关键词过滤暂不管文章内容,否则需要查询所有文章内容判断是否包含字符串
排序暂无法支持评论数量和阅读量,这两个属性属于文章统计需要 #2430 的支撑
#### Which issue(s) this PR fixes:
Fixes#2424
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind api-change
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
修复文章列表的分类、标签查询参数方法名和取值不一致导致无效问题
#### Which issue(s) this PR fixes:
Fixes#2439
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
将原来系统默认的系统配置 system 改名为 system-default, 并使用名为 system 的 ConfigMap 来存储用户自定义的系统配置。系统最终配置为用户自定义系统配置 Merge Patch 系统默认配置的结果。
see also #2304
#### Which issue(s) this PR fixes:
Fixes#2304
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0
#### What this PR does / why we need it:
Refactor CustomEndpoint for customizing GroupVersion.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/kind api-change
/area core
/milestone 2.0
#### What this PR does / why we need it:
- 修改管理后台使用的自定义 API 的 group 为 `api.console.halo.run`
- 面向三方应用的自定义 API 的 group 为 `api.halo.run`
- 插件的自定义 API 的 group 为 `api.plugin.halo.run`
#### Which issue(s) this PR fixes:
Fixes#2418
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
/kind api-change
#### What this PR does / why we need it:
- 新增评论列表自定义 API,支持过滤和排序条件
- 新增评论 Reconciler 以支持:
- 是否有新回复
- 最新回复时间
- 上次查看回复时间
- 未读回复数量
- 新增评论主体信息获取扩展点 `CommentSubject` 用于获取评论的 subject 信息 ,默认实现 `Post` 模型和 `SinglePage`
#### Which issue(s) this PR fixes:
Fixes#2409
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
新增评论列表自定义 API (包括回复)并支持过滤和排序条件
新增发表评论和回复的自定义 API
支持是否有新回复及未读回复数量
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
#### What this PR does / why we need it:
统计分类和标签下的文章
#### Which issue(s) this PR fixes:
Fixes#2401
#### Special notes for your reviewer:
how to test it?
1. 创建一个多层级的分类及若干文章,查看分类的 status.posts 是否包含当前及其子分类下的文章
2. 创建标签,并将其分配给若干文章,查看标签的 status.posts 是否正确
3. 在主题端查看分类和标签包含的文章数量是否正确,需要注意的是主题端显示的文章数量只包含已发布且 visiable 为 public 且未删除的
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
#### What this PR does / why we need it:
提供当前使用主题(预览或激活)的 configMap 变量和部分系统设置等变量。
提供了以下变量:
- `${theme}` 当前主题的信息,theme.yaml
- `${theme.config}` 获取当前主题的设置项
- ~`${siteSetting}`~ `${site}` 提供必要系统变量
#### Which issue(s) this PR fixes:
Fixes#2389
#### Special notes for your reviewer:
how to test it?
再任意主题模板上使用表达式获取例如:`${theme}`,`${theme.config.sns?.email}`
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
/area core
#### What this PR does / why we need it:
使用正则细化主题端路由并优化
如何测试:
1. 在 admin 系统设置中修改文章文章详情页访问规则
2. 根据规则访问文章详情页,如规则为:`/{year:\d{4}}/{month:\d{2}}/{slug}` 而存在文章 slug 为 fake-slug 且发布日期为 2022-09-08 则 /2022/09/fake-slug 能访问, /2022/9/fake-slug 则不能访问
使用规则 `/{year:\d{4}}/{month:\d{2}}/{day:\d{2}}/{slug}`时 /2022/09/08/fake-slug 能访问 /2022/09/8/fake-slug ,则不能访问
#### Which issue(s) this PR fixes:
Fixes#2396
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
统一主题端 VO 的结构
#### Which issue(s) this PR fixes:
Fixes#2394
#### Special notes for your reviewer:
how to test it?
通过主题端调用 finder 方法来验证
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```