Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix some cn_docs format issues #5277
fix some cn_docs format issues #5277
Changes from 6 commits
312c725
11dc538
b72871e
3cb25f7
1f495b6
021914f
a07fb8d
3c21a94
865f754
9d61505
db877e7
3cd788b
df51b34
1f3f1ba
0f85867
3a6b286
fcca32f
a51ee9d
066b359
e68bf48
6683e4f
2630167
97c450a
99a5aa4
60ae141
e213c11
d521a74
0da0ec8
dbf1b0e
1d1eb61
c263a3a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
这里链接依旧没有正常生成,请 @momozi1996 关注
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.
这个我前几天看了下,这个 label 是没有定义的,因此无法链接到正确的位置,当然按理说解决方案很简单,就添加一个 label 就行了,但问题是它在 Markdown 文件里
目前 Paddle docs 的 Sphinx 配置采用 recommonmark 进行 Markdown 解析,这个前段时间我想解决部分 Markdown 缩进表格渲染问题(如 API 命名规范 大量缩进表格无法正确渲染)时就发现了
docs/ci_scripts/doc-build-config/zh/conf.py
Line 23 in 62554fa
recommonmark 确实有很多问题,而且官方也已经不维护了,在置顶 issue 中推荐使用 MyST-Parser 来替代 recommonmark,而且我也不清楚 recommonmark 是否有方法能在 Markdown 中创建 label,至少我在文档中没看到
当然,如果 recommonmark 中有创建 label 的方式,使用该种方式直接在文档中链上即可
readthedoc 文档中明确说明了 MyST-Parser 使用 Markdown 创建 label 的方式,因此我认为也许将 Markdown 解析器换为 MyST-Parser 能彻底解决很多问题
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.
我在这个PR中测试了英文API文档互相引用和API文档中引用其他文档,都可以正常显示,可以参考:PaddlePaddle/Paddle#46347
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.
这样貌似每个 API 都需要单独计算下相对路径吧,如果想要全量修复的话应该挺麻烦的
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.
对,按目录来改吧,绝对路径不太行,很容易失效,而且没办法随版本走