starcoinorg/starcoin-org-v2

官网部分超链接失效

Opened this issue · 1 comments

用新版pc版chrome打开以下链接,高亮的部分为失效的超链接,点击后全都因为找不到文件重定向回首页了:

Run/Join Network

https://starcoin.org/zh/developer/cli/first_transaction/#:~:text=%E6%AD%A5%E9%AA%A4%E8%AF%B7%E6%9F%A5%E9%98%85-,%E4%BD%BF%E7%94%A8%20strcoin%20%E6%8E%A7%E5%88%B6%E5%8F%B0,-%E3%80%82

https://starcoin.org/zh/developer/cli/first_transaction/#:~:text=%E6%AD%A5%E9%AA%A4%E8%AF%B7%E6%9F%A5%E9%98%85-,%E8%B4%A6%E5%8F%B7%E7%AE%A1%E7%90%86,-%E3%80%82

https://starcoin.org/en/developer/key_concepts/block/#:~:text=of%20the%20ordered-,transactions,-%2C%20as%20well%20as

还有其他的有问题的链接不一一列出了。

原因时hugo在生成地址时会在url尾巴上加/(相关issue:gohugoio/hugo#3556 ),导致文件树最底层文件内的超链接错误

最简单的解决方法应该是在这些文件md里把./改成../(这个方法可以生成正确的官网源码,但是对ide跳转不友好,ide比如webstorm找不到相关文件;另外在github上也会导致跳转404,比如,点击这个超链接就会404:https://github.com/starcoinorg/starcoin-org-v2/blob/main/content/developer/cli/account_manager.md#:~:text=Using%20the%20starcoin%20console)

如果服务器能支持自定义解析规则
hugo配置文件加上uglyURLs = true,然后再配置解析规则类似于if not dir /a/->/a /a->/a.html可能是比较好的方案