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] Frontmatter对本文在sidebar的显示控制 #307

Closed
2 tasks done
bigtomcat6 opened this issue Oct 22, 2024 · 1 comment · Fixed by #308
Closed
2 tasks done

[Feature Request] Frontmatter对本文在sidebar的显示控制 #307

bigtomcat6 opened this issue Oct 22, 2024 · 1 comment · Fixed by #308
Assignees
Labels
enhancement New feature or request

Comments

@bigtomcat6
Copy link

bigtomcat6 commented Oct 22, 2024

检查清单

  • 我搜索了现有问题,没有其他人请求类似功能。
  • 我认为25%以上的用户对此功能持积极态度。

描述该功能

现在遇到一个问题:当我在items: 'auto'的情况下有README.md或者index.md,在侧边栏中会重复显示这个文件

需要一个frontmatter配置(index: boolean),可以在sidebar的情况下,控制这个文章是否在侧边栏中显示

附加上下文

No response

@bigtomcat6 bigtomcat6 added the enhancement New feature or request label Oct 22, 2024
@pengzhanbo
Copy link
Owner

这里不需要额外的控制。实际上这里的自动生成没有达到我的预期。
我虽然考虑到了 items: 'auto' 的场景,但是没有考虑到 在这一层级中当存在 README.md 时,应该将链接有条件的提升到上一级,形成: { link, items: 'auto' } 的形式。这也导致 上述的 bug 的产生。

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

Successfully merging a pull request may close this issue.

2 participants