gitbook - 防止 Gitbook 转换相对链接
问题描述
我们的 gitbook 文档必须与托管在不同位置的同一服务器上的其他文档有交叉链接。
我们有这些链接:
<a href="/stuff/documentation/api-reference.html">API Reference</a>
[API Reference](/stuff/documentation/api-reference.html)
这两个链接都由 Gitbook 转换为相对于当前页面的链接(这是针对比索引页面嵌套更深 1 级的页面):
<a href="../stuff/documentation/api-reference.html">API Reference</a>
如果带有链接的页面嵌套更深:
<a href="../../../stuff/documentation/api-reference.html">API Reference</a>
我们需要的是 Gitbook 来保持链接中的相对 URL 完全“原样”,因此它们将导致最终文档服务器上的正确路径:
<a href="/stuff/documentation/api-reference.html">API Reference</a>
到目前为止,唯一可行的解决方案是将 JS 代码导航到<a>
Markdown 内 HTML 标记中所需的相对路径,但这是一个非常丑陋的解决方法。
解决方案
推荐阅读
- java - 如何递归更新 pom.xml 中的依赖版本
- java - 在 Intellij 中的 JUnit 上安装新版本
- arrays - 如何在数组公式中使用 Round()?
- java - 如何在java中使用以下curl cmd?
- javascript - 在 JavaScript 中查找最长和最短的单词
- scala - 如何修复:来自 spark UDF 函数的 java.lang.StringIndexOutOfBoundsException
- python - Pytorch LSTM grad 仅在最后一个输出上
- node.js - 是否有硬重置 Azure 功能的方法?
- c# - GraphQL + Autofac
- css - 让我的 CSS 模块在我的 Express 应用程序上工作