在尝试构建CKAN的文档时出现错误消息"没有主题名为'sphinx-theme-okfn'"

Sea*_*ond 2 python git python-sphinx ckan

我已经在virtualenv中安装了CKAN并激活了virtualenv,并且我已经在pip-requirements-docs.txt中安装了这些需求,但是当我尝试构建文档时,我收到此错误:

> python setup.py build_sphinx
...
sphinx.errors.ThemeError: no theme named 'sphinx-theme-okfn' found (missing theme.conf?)
Run Code Online (Sandbox Code Playgroud)

Sea*_*ond 5

问题是CKAN使用的Sphinx主题不是CKAN git存储库本身的一部分,它有自己的git repo,它是CKAN git repo 的子模块.因此,在构建文档之前,您需要签出子模块:

> git submodule init
> git submodule update
> python setup.py build_sphinx
Run Code Online (Sandbox Code Playgroud)