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

首页的排序机制 #170

Open
bigbigda opened this issue Nov 22, 2023 · 1 comment
Open

首页的排序机制 #170

bigbigda opened this issue Nov 22, 2023 · 1 comment

Comments

@bigbigda
Copy link

想请问下,目前网站首页的排序机制是按文件名里的日期排的吗,这个是否支持其他排序策略(例如逆序,或者按修改时期排序),如果支持应该在哪里又该

@mzlogin
Copy link
Owner

mzlogin commented Nov 22, 2023

是按日期倒序的。

相关的代码在 index.html 文件里。

site.posts 集合的相关说明参考 http://jekyllcn.com/docs/variables/

如果想自己排序,可以用上面链接里介绍的 Jekyll 相关变量,结合 Liquid 语法来自己实现。 Liquid 参考:https://liquid.bootcss.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants