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

[Feature Request] 博客置顶功能 #46

Open
sunzhongkai588 opened this issue Mar 25, 2024 · 2 comments
Open

[Feature Request] 博客置顶功能 #46

sunzhongkai588 opened this issue Mar 25, 2024 · 2 comments

Comments

@sunzhongkai588
Copy link
Contributor

1. 需求背景

有些博客文章能帮助初入社区的开发者快速了解飞桨开源社区,如 飞桨开源社区成为国内 Top,我们做对了什么?

但目前博客展示逻辑是,会自动按发布时间顺序排下来,导致这些先前写的文章会被顶下去,埋没在后面。

2. 需求描述

希望能有置顶某篇博客的功能,具体设计可以再细聊,但需要在足够显眼的位置(如顶部,侧边栏),如 pytorch blog

hu-qi added a commit to huqi-pr/PFCCLab-blog that referenced this issue Mar 26, 2024
hu-qi added a commit to huqi-pr/PFCCLab-blog that referenced this issue Mar 26, 2024
@hu-qi
Copy link
Member

hu-qi commented Mar 26, 2024

可以尝试给 frontmatter 加字段来标记置顶文章, loader 处理 post 的时候优先根据置顶字段排序:

---
title: 飞桨开源社区成为国内 Top,我们做对了什么?
date: 2023-12-02
author:
   name: 梦师傅
   github: Ligoml
+ pinned: true
---

简易效果:

image

@sunzhongkai588
Copy link
Contributor Author

感谢胡哥!!效果可以的(其实 PR 是不是可以先合入了)~

个人认为可以通过一些设计,突出一下置顶文章,目前想到可能添加背景图片、放大字体等(拍脑袋想的),不过现在的效果好像也能达到~可以讨论一下大家的想法 @hu-qi @SigureMo

github-merge-queue bot pushed a commit that referenced this issue Mar 27, 2024
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