跳转到主要内容

Sphinx扩展用于Cylc文档

项目描述

Cylc项目文档的Sphinx扩展库。

安装

安装所有扩展(但不包括依赖项)

$ pip install cylc-sphinx-extensions

或指定扩展(按名称)的所有扩展 + 依赖项

$ pip install cylc-sphinx-extensions.git[cylc_lang]

或所有扩展 + 所有扩展的依赖项

$ pip install cylc-sphinx-extensions.git[all]

注意,minicylc扩展需要graphviz

# install graphviz from your package manager e.g:
$ sudo apt-get install -y graphviz

使用

要使用扩展,请在项目的conf.py中注册它,例如

extension = [
    'cylc.sphinx_ext.cylc_lang'
]

其中一些扩展是“自动加载”的,不需要任何额外步骤来激活。

如果您的conf.py中设置了html_static_path配置,则需要将其移动到setup函数中,否则扩展无法将其附加到该路径以添加自己的静态资源,例如

def setup(app):
    app.config.html_static_path.append('_static')

开发

https://github.com/cylc/cylc-sphinx-extensions.git分叉并克隆。

扩展从其模块文档字符串自动生成文档。

通过运行来构建文档

$ make clean <format>  # e.g. make html slides

此文档构建作为简单的测试库(警告会导致其失败),其他一切请使用pytest

$ pytest

用于代码检查

$ pycodestyle .  # python
$ eslint cylc/   # javascript

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面