Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用readthedocs.org使用的静态资产进行本地Sphinx构建的简单方法是什么?_Python_Css_Python Sphinx_Read The Docs - Fatal编程技术网

Python 使用readthedocs.org使用的静态资产进行本地Sphinx构建的简单方法是什么?

Python 使用readthedocs.org使用的静态资产进行本地Sphinx构建的简单方法是什么?,python,css,python-sphinx,read-the-docs,Python,Css,Python Sphinx,Read The Docs,目前,我能找到的获取readthedocs.org当前使用的设计资产的唯一方法是安装并构建它,这需要SASS等 我只想得到一组静态文件,让我在本地看到我的构建在readthedocs上的样子。有没有一种方法可以做到这一点,而不必通过上述链接自己构建资产?我们的目标是让新手能够轻松地为文档做出贡献。如果你想为主题做出贡献/发展,你只需要构建主题。您可以使用pip install sphinx\u rtd\u theme安装主题。然后可以在Sphinxconf.py中使用该主题。见: # on_rt

目前,我能找到的获取readthedocs.org当前使用的设计资产的唯一方法是安装并构建它,这需要SASS等


我只想得到一组静态文件,让我在本地看到我的构建在readthedocs上的样子。有没有一种方法可以做到这一点,而不必通过上述链接自己构建资产?我们的目标是让新手能够轻松地为文档做出贡献。

如果你想为主题做出贡献/发展,你只需要构建主题。您可以使用
pip install sphinx\u rtd\u theme
安装主题。然后可以在Sphinx
conf.py
中使用该主题。见:

# on_rtd is whether we are on readthedocs.org
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# otherwise, readthedocs.org uses their theme by default, so no need to specify it