#### 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/2483
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
测试方式:
1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2483 PR 中的分支。
2. Console 需要 `pnpm install`
3. 发布多篇带分类和标签的文章后,检查分类和标签的文章数量是否正确。
#### 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
/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
```