【发布时间】:2020-03-05 21:51:36
【问题描述】:
我正在使用 sphinx 构建我的 python 包文档,但是我在将 docs 文件夹中其他文件的条目和 index.rst 上的其他部分中的条目添加到目录时遇到了一些麻烦。
这些是我的 docs 文件夹内容:
$ ls docs/
api_reference.rst _build conf.py index.rst make.bat Makefile _static _templates
这些是 index.rst 的第一行:
Welcome to SPIN's documentation!
================================
This is the Sorting Points Into Neighborhoods clustering method documentation.
.. toctree::
:maxdepth: 2
:caption: Contents:
:ref:`Introduction`
api_reference
.. _introduction:
Introduction
============
Sorting Points Into Neighborhoods, aka SPIN, is clustering
technique that only relies on the data and does not map any function on the
original space of the data points. :ref:`Introduction`
介绍部分的第二个引用有效,但目录树上的第一个无效。
如何将 api-reference 和 Introduction 都添加到目录中?
【问题讨论】:
标签: python python-sphinx tableofcontents toctree