Python的网站如何生成其在线文档?

发布于 2024-09-02 10:05:48 字数 536 浏览 7 评论 0原文

使用 Sphinx 0.6.5 创建。

我知道Python的文档使用reStructuredText,但它有不同的部分,例如http://docs.python.org/whatsnew/2.6.htmlhttp:// docs.python.org/tutorial/index.html

如何在 reStructuredText 中做到这一点?您是否在一堆目录中运行 rst2html 并保持其结构?

我知道它使用Sphinx(不是直接使用rst2html,如Thomas Wouters 的回答),但是您应该如何使用存储库中的源代码文件组织第一个结构,以便拥有一个完整的自动化文档网站?

Created using Sphinx 0.6.5.

I know Python's documentation uses reStructuredText, but it has different sections like http://docs.python.org/whatsnew/2.6.html and http://docs.python.org/tutorial/index.html.

How do you do this in reStructuredText? Do you run rst2html in a bunch of directories, keeping its structure?

I know that it uses Sphinx (not rst2html directly as said by Thomas Wouters in an answer), but how you should organize your rst structure with source code files in a repository so you have a full blown automated doc website?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

没︽人懂的悲伤 2024-09-09 10:05:48

Python 文档使用 reST 作为其标记,但它使用 sphinx 生成 HTML,而不是直接使用 rst2htmlsphinx 工具可将所有单独的 .rst 文件转换为多个 .html 文件。要了解如何生成 Python 文档,请参阅 http://svn.python.org /projects/python/trunk/Doc/Makefile

The Python documentation uses reST for its markup, but it generates the HTML using sphinx, not rst2html directly. The sphinx tool is what converts all the individual .rst files into multiple .html files. To see how the Python docs are generated, see http://svn.python.org/projects/python/trunk/Doc/Makefile

妞丶爷亲个 2024-09-09 10:05:48

我发现matplotlib 网站上的sampledoc 教程对于开始使用Sphinx 非常有用。

I found the sampledoc tutorial on the matplotlib site quite useful to get started with Sphinx.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文