Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
197 views
in Technique[技术] by (71.8m points)

python - Sphinx generates HTML output from outdated source code

I'm using Sphinx to generate HTML documentation. Everything works great but for some reason, the source code and comments in the generated HTML file are really outdated. I don't even understand how it's possible. I've deleted all files multiple times and generated it again and still the same issue.

question from:https://stackoverflow.com/questions/65925179/sphinx-generates-html-output-from-outdated-source-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Are you using autodoc extension alongside with sphinx-apidoc util?

If so, then you may want to re-generate the content of doc/source in your package, considering that the documentation is in docs directory.

$ cd docs
$ rm -r source
$ sphinx-apidoc -o source ../<package_name>

Here ../<package_name> is used to provide a path to the package content.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...