Skip to content

feat: support setting rendering templates for related posts on category - #6106

Merged
f2c-ci-robot[bot] merged 2 commits into
halo-dev:mainfrom
guqing:feature/6101
Jun 20, 2024
Merged

feat: support setting rendering templates for related posts on category#6106
f2c-ci-robot[bot] merged 2 commits into
halo-dev:mainfrom
guqing:feature/6101

Conversation

@guqing

@guqing guqing commented Jun 20, 2024

Copy link
Copy Markdown
Member

What type of PR is this?

/kind feature
/area core
/milestone 2.17.x

What this PR does / why we need it:

支持在分类上为关联的文章统一设置渲染模板

现在文章的模板生效顺序为:

  1. 文章关联的分类上设置的文章模板,如果有多个则选择第一个
  2. 文章上设置的自定义模板
  3. 文章的默认模板

Which issue(s) this PR fixes:

Fixes #6101

Does this PR introduce a user-facing change?

支持在分类上为关联的文章统一设置渲染模板

@f2c-ci-robot f2c-ci-robot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 20, 2024
@f2c-ci-robot f2c-ci-robot Bot added this to the 2.17.x milestone Jun 20, 2024
@f2c-ci-robot f2c-ci-robot Bot added the area/core Issues or PRs related to the Halo Core label Jun 20, 2024
@f2c-ci-robot
f2c-ci-robot Bot requested review from Aanko and wan92hen June 20, 2024 03:27
@guqing

guqing commented Jun 20, 2024

Copy link
Copy Markdown
Member Author

Hi @ruibaby ,需要为分类增加文章模板的选择项,帮忙提供一下 UI

@codecov

codecov Bot commented Jun 20, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 61.53846% with 5 lines in your changes missing coverage. Please review.

Project coverage is 56.45%. Comparing base (5fdf6c0) to head (7d108d7).
Report is 239 commits behind head on main.

Files Patch % Lines
...o/app/theme/router/factories/PostRouteFactory.java 66.66% 3 Missing and 1 partial ⚠️
.../run/halo/app/core/extension/content/Category.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6106      +/-   ##
============================================
- Coverage     56.91%   56.45%   -0.47%     
- Complexity     3319     3551     +232     
============================================
  Files           587      625      +38     
  Lines         18968    20988    +2020     
  Branches       1401     1484      +83     
============================================
+ Hits          10795    11848    +1053     
- Misses         7594     8537     +943     
- Partials        579      603      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Ryan Wang <i@ryanc.cc>
@ruibaby
ruibaby marked this pull request as ready for review June 20, 2024 07:03
@f2c-ci-robot f2c-ci-robot Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 20, 2024
@f2c-ci-robot
f2c-ci-robot Bot requested review from JohnNiang and wzrove June 20, 2024 07:03
@ruibaby

ruibaby commented Jun 20, 2024

Copy link
Copy Markdown
Member

Hi @ruibaby ,需要为分类增加文章模板的选择项,帮忙提供一下 UI

Done

@JohnNiang JohnNiang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot f2c-ci-robot Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 20, 2024

@ruibaby ruibaby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2024
@f2c-ci-robot

f2c-ci-robot Bot commented Jun 20, 2024

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot
f2c-ci-robot Bot merged commit b5f9010 into halo-dev:main Jun 20, 2024
@guqing
guqing deleted the feature/6101 branch June 20, 2024 08:17
@ruibaby ruibaby modified the milestones: 2.17.x, 2.17.0 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

期望支持为某个分类下的文章统一设置渲染模板

3 participants