-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
docs: migrate to dumi #11269
docs: migrate to dumi #11269
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: 0 B Total Size: 10.1 MB ℹ️ View Unchanged
|
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #11269 +/- ##
=======================================
Coverage 29.03% 29.03%
=======================================
Files 484 484
Lines 14701 14701
Branches 3473 3473
=======================================
Hits 4268 4268
Misses 9678 9678
Partials 755 755
☔ View full report in Codecov by Sentry. |
|
||
<Tabbed> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方现在迁移到 dumi 之后与原来相比差异较大
之前是umi的内置组件
dumi 可以等待这个 pr 合并之后加上 code-group 语法
umijs/dumi#1734
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外,还需要 check 以下点:
-
所有 markdown 文档内的互相链接是否正确,即应该尽量保持原来的文件排布层级,否则相对的链接会被破坏,需要验证下有没有不好用的链接。
-
尽量保持迁移前后的 url 不变,因为 umi 4 已经很久了,历史的 url 已经散播的到处都是,内部 did you know 也有大量使用,所以至少应该保证不破坏 url ,确保迁移前后的同一文档 url 是一模一样的,尽量每篇文章的 hash 子标题锚点也保持一致,如果因计算方法不一致,没法保持 hash 一致,至少要确保页面 url 没有 Breaking change 。
-
CI 需要修改,确保 vercel 部署构建成功,可以在这个 PR 下面的 vercel 机器人回复中点击 “Preview” 看到实际站点的效果(我看现在是无法预览的)。
@@ -1,10 +1,10 @@ | |||
import React from 'react'; | |||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果没有 umi 导入的类型提示,可以继承下生成的 tsconfig.json 。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vercel地址: https://umi-api-route-demo.vercel.app/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI 里默认的 Vercel 挂了:#11269 (comment)
需要找云谦老师看下原因,使用的是他的个人账号
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vercel地址: https://umi-api-route-demo.vercel.app/
基于这个预览地址的几个改进建议:
- 把导航拆出来,分成『介绍』、『指南』、『API』、『Umi Max』和『博客』五个
- 版本切换和 dumi 2 一样放到最右侧,参考:https://github.com/umijs/dumi/blob/master/.dumi/theme/slots/HeaderExtra/index.tsx
- 『快速上手』合并到『指南』导航下,原路径使用运行时配置 patch 一个重定向路由做跳转
- 首页的 Footer 区域宽度应该是铺满页面的
- 其他页面的 Footer 区域丢失了,可以用 dumi 提供的 slots/Footer 来实现对底部区域的自定义
- themeConfig.logo 需要手动设置下,后续 dumi 会把默认 logo 换成 dumi 的 logo,地址用:https://github.com/umijs/dumi/blob/master/.dumi/theme/builtins/WhoAreUsing/index.tsx#L42
- ssr 开起来看看有没有问题:https://github.com/umijs/dumi/blob/master/.dumirc.ts#L27
- sitemap 生成开起来:https://github.com/umijs/dumi/blob/master/.dumirc.ts#L31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版本切换和 dumi 2 一样放到最右侧 ---- 部署上去不生效,是有另外的配置吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dumi 升级都 2.2.1,这个版本修了不生效的问题
docs/docs/docs/max/mf.mdd
Outdated
|
||
## 配置 | ||
|
||
### 使用远端模块配置 | ||
|
||
<Tabbed> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
等 dumi 这个 PR 发布后就可以支持 tab 了:umijs/dumi#1734
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@fz6m 这部分和我上面给的 comment 有冲突,我重新说明下以免 @hualigushi 搞蒙了 😅 第一段我的建议是把导航拆出来变成 5 个,当前版本(侧边栏太长)和 PR 版本(二级导航太隐蔽)都不利于用户快速查找内容,原评论:#11269 (comment) 第二段可以修改 dumi 的 Less 变量实现控制:https://github.com/umijs/dumi/blob/6d3df2edacc21ff966f71ee8ceb2db9394774e6f/src/client/theme-default/styles/variables.less#L5 第三段和第四段都是 dumi 默认主题待优化的地方,可以后续在 dumi 里处理,和这个 PR 分开 你看看上述结论我们能否达成一致 |
dumi 的语法。。。。。 |
@hualigushi 剩余的几个问题:
|
This comment was marked as outdated.
This comment was marked as outdated.
@@ -0,0 +1,18 @@ | |||
{ | |||
"name": "@umijs/docs", | |||
"version": "0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个私有包需要明确标注,防止发布。
"private": true
另外建议做如下改进:
|
migration documentation to dumi