#### 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
/milestone 2.0
#### What this PR does / why we need it:
支持删除主题的时候删除对应的 Setting 和 ConfigMap 资源。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2325
#### Screenshots:
<img width="1004" alt="image" src="https://user-images.githubusercontent.com/21301288/191994812-0ad32b23-e461-4286-9bd7-ce12b413f580.png">
#### Special notes for your reviewer:
测试方式:
1. 安装一个带有设置项的主题并做一定的配置。
2. 选择**卸载并删除配置**的选项。
3. 重新安装主题,检查设置项是否已经恢复为默认。
#### Does this PR introduce a user-facing change?
```release-note
支持卸载主题时,删除对应的 Setting 和 ConfigMap 资源。
```
#### 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
/milestone 2.0
#### What this PR does / why we need it:
修复在生产模式下,附件列表的图片无法及时加载的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2465
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-console
测试方式:
1. 本地 console 仓库切换到此 PR 的分支。
2. 构建生产资源:`pnpm build`
3. 参考 https://github.com/halo-dev/halo/pull/2453 配置本地 Halo 代理 Console
4. 访问 <http://localhost:8090/console>,切换到附件页面。
5. 测试上传图片之后是否可以正常加载。
#### 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:
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 feature
/milstone 2.0
#### What this PR does / why we need it:
在构建时,为静态资源添加随机字符串后缀。防止升级版本之后缓存不会及时更新。
#### Which issue(s) this PR fixes:
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-admin
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/milestone 2.0
#### What this PR does / why we need it:
适配 https://github.com/halo-dev/halo/pull/2453
1. 将生产构建的 base url 更改为 console
2. 优化登录之后跳转的逻辑。
#### Which issue(s) this PR fixes:
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo-admin
测试方式:
1. 在本地根据此 PR 构建生产版本(pnpm build)
2. 根据 https://github.com/halo-dev/halo/pull/2453#issue-1381947867 中的描述修改配置文件。
3. 访问 http://localhost:8090/console
#### 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
```