python - 更新python文件时,Sphinx不会更新html页面

标签 python python-sphinx restructuredtext

我有一个问题,当我的 python 文件更新时,Sphinx 不会更新 html 页面。

我的 docs folder看起来像这样:
enter image description here
api.rst上面文件夹中的文件如下所示:

API Documentation
=================

This is a documentation for the Helstrom Quantum Centroid (HQC) classifier's API.

.. automodule:: hqc.HQC
    :members:
hqc folder看起来像这样:
enter image description here

两者docs folderhqc folder都在同一个 HQC folder .

当我更新 HQC.py文件并运行 make html在命令提示符下,html 页面不会自行更新。

但是我注意到当我将文件夹名称从 hqc 更改时到一个新的文件夹名称,比如 hqc1 (并在 hqc.HQC 文件中将 hqc1.HQC 更改为 api.rst),然后当我运行 make html 时 html 页面会更新.

我错过了什么或如何解决这个问题?真的更喜欢hqc folder姓名留为hqc .

最佳答案

有时会在 sphinx 无法识别更改时发生,请使用 make clean && make html ,这将首先删除所有现有文件,然后创建新文件。

关于python - 更新python文件时,Sphinx不会更新html页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59807387/

相关文章:

javascript - 为 D3 解析 JSON 的问题

python - 如何将 Motor Latent CommandCursor 转换为列表

latex - 将 latex 转换为 rst/sphinx

python - 是否有用于 ReST 文件的智能编辑器?

python - 访问属性时打印一些内容

python - 尝试写入文件时出现 "FileNotFoundError: [Errno 2] No such file or directory"

python - 有什么方法可以通过 sphinx 使用 python2.x 和 python3.x 生态系统构建文档?

parameters - 使用python sphinx重复参数

jquery - 如何用 Sphinx 制作斑马 table ?或者如何将 jQuery 与 Sphinx 一起使用?

python - 如何用狮身人面像制作两列