-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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: add strategy setting for post slug generation #4551
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4551 +/- ##
============================================
- Coverage 61.07% 61.04% -0.03%
Complexity 2566 2566
============================================
Files 374 374
Lines 13162 13168 +6
Branches 937 938 +1
============================================
Hits 8039 8039
- Misses 4670 4676 +6
Partials 453 453
📢 Have feedback on the report? Share it here. |
Signed-off-by: guqing <i@guqing.email>
@GodlessLiu 已在 globalinfo 中添加 postSlugGenerationStrategy 字段 |
是否考虑分类或者标签的生成也可以应用所选策略 |
@guqing 添加设置在 |
建议目前仅对文章生效,分类和标签保持以前的逻辑。
可以放在文章设置下。后续如果对分类和标签也有这样的需求,也可以放在文章设置下,因为分类和标签只是文章的概念。 |
在保存系统设置之后,清理掉 key 为 globalinfo 的 缓存即可。 |
添加了 postSlugGenerationStrategy 的默认值,console 部分 @GodlessLiu 继续改就好了,我发现文章点保存的之后规则是还是默认的时间戳应该功能不全 |
|
Refine camel-case Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
console/src/modules/contents/posts/categories/components/CategoryEditingModal.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/milestone 2.10.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing 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 |
What type of PR is this?
/kind improvement
What this PR does / why we need it:
添加文章别名自动生成策略
Which issue(s) this PR fixes:
Fixes #1790
Special notes for your reviewer:
需要后端提供支持在globalInfo里面添加

gSlugMode
字段。它的类型为(后续可能会支持更多的模式)Does this PR introduce a user-facing change?