docs: compat with old hash anchors #12211
Merged
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.
close #12158
因为:
0a666fc
5d64b5c
以上两个对文档 title 的改动,导致以前的 hash 锚点失效了,大面积历史 url 无法正常跳转。
由于大量历史锚点(特别是
patchClientRoutes
等)使用的十分频繁,所以影响面非常大,比较严重。此 PR 兼容了历史锚点并跳转到新锚点。
注:若以后还需改动 title ,应考虑将跳转逻辑变为 map 映射,防止过多兼容逻辑反复运行的成本。