Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Jun 20, 2024

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
Copy link
Member Author

guqing commented Jun 20, 2024

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

Copy link

codecov bot commented Jun 20, 2024

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 <[email protected]>
@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
Copy link
Member

ruibaby commented Jun 20, 2024

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

Done

Copy link
Member

@JohnNiang JohnNiang left a comment

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
Copy link
Member

@ruibaby ruibaby left a comment

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
Copy link

f2c-ci-robot bot commented Jun 20, 2024

[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

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
7 checks passed
@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