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

特性提议:支持将某个分类下的文章设置为不进入“最新文章”列表 #2508

Closed
AsakusaRinne opened this issue Oct 3, 2022 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@AsakusaRinne
Copy link

你当前使用的版本

1.5.4

描述一下此特性

支持将某个分类下的文章设置为不进入“最新文章”列表。

比如我用halo给自己搭建了一个技术博客分享网站,但是里面也有一些自己日常非技术类的文章,虽然这些非技术类文章也是公开的,但是不希望作为“最新文章”列表中的一个出现在首页喧宾夺主,能否将某个分类设置成不参与“最新文章”列表的收录呢?

很抱歉因为我不怎么用JAVA和FreeMaker,很难直接自己实现并进行PR,不过如果能帮忙指出在哪几个文件修改可以实现这个的话,我很乐意学习一下并针对这个提一个PR。

国庆快乐!:)

附加信息

No response

@ruibaby
Copy link
Member

ruibaby commented Oct 3, 2022

这个特性提议不错,其实不仅仅是你提到的这种场景。像 Halo 官网这种,主题仓库也是通过文章发布的,那么在博客列表里面肯定就是不希望出现主题内容的,这个时候就需要排除特定的分类。

如果你想尝试一下修改,你可以看一下这个查询构建筛选条件的部分:

public Page<Post> pageBy(PostQuery postQuery, Pageable pageable) {

如果要在 1.5 支持该特性,可能需要考虑较多的地方。我们也会在 2.0 考虑是否要支持该特性。

/kind feature

@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 3, 2022
@AsakusaRinne
Copy link
Author

感谢回答,期待2.0可以支持这个特性。

仔细看了一下这部分代码,感觉可能还是要交给专业的人去做这个事情哈哈,我的技术栈实在跟JAVA以及Web应用不太搭边🤣恐怕短时间内搞不定这个

@ruibaby
Copy link
Member

ruibaby commented Jun 30, 2024

已经在 #6116 中支持,将发布在 2.17.0。

/close

Copy link

f2c-ci-robot bot commented Jun 30, 2024

@ruibaby: Closing this issue.

In response to this:

已经在 #6116 中支持,将发布在 2.17.0。

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot closed this as completed Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants