arvinxx / dumi-theme-antd-style

dumi-theme for antd-style site
https://dumi-theme-antd-style.arvinx.com
MIT License
76 stars 37 forks source link

🐛[BUG] FrontMatter 中 toc: false 无效 #13

Closed CJY0208 closed 1 year ago

CJY0208 commented 1 year ago

🐛 bug 描述

FrontMattertoc: false 无效, dumi 2x 仍支持此功能

查阅代码,src/pages/Docs/index.tsx<Toc /> 无条件加载,希望可受 toc: false 控制

📷 复现步骤

🏞 期望结果

💻 复现代码

--

© 版本信息

--

🚑 其他信息

CJY0208 commented 1 year ago

后续附带 PR

arvinxx commented 1 year ago

能举例说明下什么场景下不需要 toc 吗?以及会需要端的差异么?比如 pc 不需要,mobile 需要。或pc需要 mobile 不需要

CJY0208 commented 1 year ago

什么场景下不需要 toc ?

可能存在最大限度腾出空间,给 doc content 进行效果演示的场景,如 Page 页面级组件

类似于用 dumi 文档站点做出 Ant Design Pro 预览站点的不同类型页面的效果

也需要配合 contentMaxWidth 最大化 content 内容宽度

会需要端的差异么?

不确定,我们这边没有场景

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.19.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: