欢迎
Sphinx 是在 BSD 许可证下由 Georg Brandl 编写,用于创建智能而美丽文档的工具。
它最初是为 Python 文档 而创建,并且它有很好的设施来记录一系列语言的软件项目。当然,这个网站也是使用 Sphinx 从 reStructuredText 源创建的!应该强调以下特点:
- 输出格式: HTML(包括 Windows HTML 帮助)、LaTeX(用于可打印的 PDF 版本)、ePub、Texinfo、手册页、纯文本
- Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information
- Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children
- Automatic indices: general index as well as a language-specific module indices
- Code handling: automatic highlighting using the Pygments highlighter
- Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and more
- Contributed extensions: dozens of extensions contributed by users; most of them installable from PyPI
Sphinx uses reStructuredText as its markup language, and many of its strengths come from the power and straightforwardness of reStructuredText and its parsing and translating suite, the Docutils.
Documentation
First steps with Sphinx |
Tutorial |
|
目录 | Search page |
|
Changes | 总目录 |
You can also download PDF/EPUB versions of the Sphinx documentation from pop up menu on lower right corner.
实际案例
Links to documentation generated with Sphinx can be found on the Projects using Sphinx page.
For examples of how Sphinx source files look, use the “Show source” links on all pages of the documentation apart from this welcome page.
You may also be interested in the very nice tutorial on how to create a customized documentation using Sphinx written by the matplotlib developers.
There is a translation team in Transifex of this documentation, thanks to the Sphinx document translators.
A Japanese book about Sphinx has been published by O'Reilly: Sphinxをはじめよう / Learning Sphinx.
In 2019 the second edition of a German book about Sphinx was published: Software-Dokumentation mit Sphinx.
Hosting
Need a place to host your Sphinx docs? readthedocs.org hosts a lot of Sphinx docs already, and integrates well with projects' source control. It also features a powerful built-in search that exceeds the possibilities of Sphinx' JavaScript-based offline search.
Contributor Guide
If you want to contribute to the project, this part of the documentation is for you.
Code of Conduct
Please adhere to our Code of Conduct.