【问题标题】:Sphinx connection between two documentations两个文档之间的 Sphinx 连接
【发布时间】:2012-07-27 10:21:31
【问题描述】:

我正在为一些 python 项目编写文档。我在连接两个或更多文档时遇到问题 - 我有三个 Sphinx 项目(文档),我希望能够在一般文档中添加指向详细文档的链接。

我有这样一个项目结构:

project/
|     doc/                          # this is my general doc
|     |    source/                  # sphinx general doc .rst files are here
|     |     build/
|     |    _static/
|     |    _templates/
|     |    CVS/
|
|
|     forms/
|     |    doc/
|     |    |    source/             # sphinx forms doc .rst files are here
|     |    |     build/
|     |    |    _static/
|     |    |    _templates/
|     |    |    CVS/    
|     |     
|     |    src/                     # forms source .py files are here
|
|     tables/
|     |    doc/
|     |    |    source/             # sphinx tables doc .rst files are here
|     |    |     build/
|     |    |    _static/
|     |    |    _templates/
|     |    |    CVS/    
|     |     
|     |    src/                     # tables source .py files are here

Forms doc 和 Tables doc 都包含使用源文件生成的文档

.. automodule:: 指令。

如何在我的常规文档中创建指向表单和表格文档的链接?

也许我需要重新组织一些东西?

我已经阅读了一些关于 intersphinx 的内容,但到目前为止,我发现的示例仅显示如何链接到

通过在 sphinx 项目的 conf.py 文件中指定 URL 来编写 Python 标准库文档,如下所示:

intersphinx_mapping = {'python': ('http://docs.python.org/3.2', None)}

我不知道如何用不同于标准库的东西来创建这样的东西,我 想要

通过相对路径而不是 URL 指定其位置 - 有什么想法吗?

【问题讨论】:

    标签: python python-sphinx


    【解决方案1】:

    intersphinx 配置中的位置(在您的示例中为“http://docs.python.org/3.2”)实际上可以是任何 URI 或指向目录的路径,其中创建了名为 objects.inv 的文件由 HTML 构建器生成并包含名称和链接的注册表。尝试使用类似“../forms/_build/html”的东西。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-06
      • 1970-01-01
      • 2013-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-06
      相关资源
      最近更新 更多