如何解决sphinx自动构建-用法,makefile,扩展名
我是第一次使用狮身人面像,所以我确定这只是一个了解基础知识的问题,对此感到抱歉。
使用窗口,make.bat
的一部分看起来像这样:
if "%sphinxBUILD%" == "" (
set SphinxBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
if "%1" == "deploy" goto deploy
%sphinxBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed,then set the SphinxBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed,grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%sphinxBUILD% -M %1 %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %O%
goto end
if "%1" == "livehtml" (
sphinx-autobuild %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %2
) else (
%sphinxBUILD% -M %1 %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %2
)
goto end
:deploy
rmdir /S /Q ..\..\public || true
cp -r _build\html ..\..\public
goto end
:help
%sphinxBUILD% -M help %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %O%
我在其中添加零件的地方
if "%1" == "livehtml" (
sphinx-autobuild %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %2
) else (
%sphinxBUILD% -M %1 %sOURCEDIR% %BUILDDIR% %sphinxOPTS% %2
)
goto end
根据https://bskinn.github.io/Sphinx-Autobuild-Windows/
致电make.bat livehtml
时收到错误消息:
我用Google搜索,这就是我发现的全部内容:https://github.com/readthedocs/readthedocs-sphinx-ext/issues/27
因此看来我可能必须将autobuild扩展名添加到conf.py
文件中-但是如何?
或者也许是其他东西?我确实用pip安装了sphinx-autobuild。
解决方法
sphinx-autobuild是一个启动Web服务器并探查docs
目录中的更改以自动刷新浏览器中正在开发的文档的打开页面的应用程序。
它不是狮身人面像extension,也不是its documentation声称它是狮身人面像。
您收到的错误:
当我调用“ make.bat livehtml”时,出现错误:生成器名称livehtml未注册或通过入口点可用
表示当您尝试运行make livehtml
时,尚未保存对Make文件的更改。对make文件的编辑将启动sphinx-autobuild
,而不是通常的sphinx-build
。由于sphinx-build
正常运行,因此将livehtml
传递为找不到的buildername。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。