ITADN
sphinx-doc/sphinx
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

Sphinx

.. image:: https://img.shields.io/pypi/v/sphinx.svg :target: https://pypi.org/project/Sphinx/ :alt: Package on PyPI

.. image:: https://github.com/sphinx-doc/sphinx/actions/workflows/main.yml/badge.svg :target: https://github.com/sphinx-doc/sphinx/actions/workflows/main.yml :alt: Build Status

.. image:: https://readthedocs.org/projects/sphinx/badge/?version=master :target: https://www.sphinx-doc.org/ :alt: Documentation Status

.. image:: https://img.shields.io/badge/License-BSD%202--Clause-blue.svg :target: https://opensource.org/licenses/BSD-2-Clause :alt: BSD 2 Clause

Sphinx 让创建智能且美观的文档变得轻而易举。

Sphinx 使用 reStructuredText 作为其标记语言,其许多优势 源自 reStructuredText 及其解析和转换套件 Docutils 的强大与简洁。

Features

  • 输出格式:HTML、PDF、纯文本、EPUB、TeX、手册页等
  • 广泛的交叉引用:针对函数、类、术语表条目及类似信息片段的语义标记和自动链接
  • 层次结构:轻松定义文档树,并自动链接到同级、父级和子级
  • 自动索引:通用索引以及模块索引
  • 代码高亮:使用 Pygments 高亮器进行自动高亮
  • 模板化:使用 Jinja 2 模板引擎实现灵活的 HTML 输出
  • 扩展生态系统:提供许多扩展,例如用于自动函数文档或处理 Jupyter notebooks。
  • 语言支持:通过扩展支持 Python、C、C++、JavaScript、数学以及许多其他语言。

有关更多信息,请参阅 the documentation_。

安装

以下命令从 Python Package Index_ 安装 Sphinx。 您需要一个可用的 Python 和 pip 安装环境。

.. code-block:: shell

pip install -U sphinx

贡献

我们感谢所有贡献!请参阅 the contributors guide_ 获取 相关信息。

.. _the documentation: https://www.sphinx-doc.org/ .. _the contributors guide: https://www.sphinx-doc.org/en/master/internals/contributing.html .. _Python Package Index: https://pypi.org/project/Sphinx/