我试图找出如何使用Sphinx中的_template覆盖选项覆盖默认的ReadTheDocs主题,以便在http://readthedocs.org上托管Sphinx文档.
具体来说,我想要删除/隐藏此主题右上角显示的"在Github上编辑"链接.
任何提示将非常感谢!谢谢!
我在这里查看了文档:http://www.sphinx-doc.org/en/stable/templating.html但是,我很难过,真的需要一些帮助.
谢谢!
我正在使用 sphinx 和 read-the-docs 主题创建 html 文档。当我添加缩放图像时,可以单击它并在新选项卡中弹出全尺寸。如何禁用此行为。
例如,我在整个文档中使用以下场景 1) 创建一个 png 文件,例如 application-icon.png ,大小正好为 10pt x 10pt。2)创建一个包含以下内容的文档:
.. |应用程序_图标| 图像::图像/应用程序图标.png
:宽度:10pt
:高度:10pt
单击应用程序图标 |application_icon| 显示 …”
当包含宽度和高度比例信息时,即使我在手机上查看文档,图标也会显示完美且正确的大小。但是,该图标是可点击的,并会打开一个显示图像的新选项卡。如果我省略了比例信息,图标将不再可点击,但是在我的手机上打开文档时图像不会缩放,而是占据了手机屏幕的整个宽度。
我有一个RST文件,我不希望任何语法高亮.它包含多个文字块和文件顶部的高亮指令,以尝试禁用语法高亮:
.. highlight:: none
::
Text that happens to contain words like list, None, etc.
::
Another literal block with words like list, None, etc.
Run Code Online (Sandbox Code Playgroud)
项目中的其他一些RST文件使用语法高亮显示,使用如下指令:
.. highlight:: bash
Run Code Online (Sandbox Code Playgroud)
当我在工作站上使用sphinx构建文档时,sphinx正确地突出显示启用的语法并禁用禁用语法高亮显示的语法.但是,当在readthedocs网站上构建时,在包含RST文件的文字块中会出现不需要的Python语法突出显示.. highlight:: none.突出显示"无"和"列表"之类的单词.
如何在此RST文件中有选择地禁用语法突出显示,同时将语法高亮显示在其他位置?
我现在开始阅读readthedocs。{org,io},并创建了一个错误的项目,现在我想删除该项目。我已经查看了我可以对项目执行的各种操作,没有看到标记为“删除”的任何按钮,也没有在支持页面中找到任何有关删除不正确项目的文档。
这只是尚未实现的功能吗?
谢谢!
我已按照https://docs.readthedocs.io/en/stable/webhooks.html上的说明操作,并向 github 添加了一个 webhook 以触发我构建的 readthedocs,但是 readthedocs 拒绝了有效负载:
Response
Status:
400
Content-Type:
text/html; charset=utf-8
Allow:
POST, OPTIONS
Run Code Online (Sandbox Code Playgroud)
细节:
{
"detail": "Payload not valid, invalid or missing signature"
}
Run Code Online (Sandbox Code Playgroud)
这是请求的标头:
Host:
...
Connection:
close
Accept:
*/*
Max-Forwards:
10
User-Agent:
GitHub-Hookshot/903858c
X-Github-Event:
push
X-Github-Delivery:
2be06d44-552f-11e9-91f6-d1c2bea59bd2
X-Original-Host:
readthedocs.org
X-Original-Url:
/api/v2/webhook/.../.../
X-Arr-Ssl:
2048|256|C=GB, S=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA|OU=Domain Control Validated, OU=EssentialSSL Wildcard, CN=*.readthedocs.org
X-Arr-Log-Id:
fef5ee2e-6edd-4386-ad1f-79400cee2d46
Content-Type:
application/json
Run Code Online (Sandbox Code Playgroud)
带有效载荷:
{
"after": "..."
"base_ref": null,
"before": …Run Code Online (Sandbox Code Playgroud) 背景:我升级了我的存储库以使用 python 3.9(以前是 3.6)。将所有软件包升级到最新。注意到我的文档没有使用 sphinx-rtd-theme 进行格式化。请参阅https://docs.members.loutilities.com/en/1.4.1.dev1/与https://docs.members.loutilities.com/en/1.4.0/进行比较
使用 chrome 控制台查看了差异,在 1.4.0 中,格式化是通过https://docs.members.loutilities.com/en/1.4.0/_static/css/theme.css完成的,但是 theme.css 1.4.1.dev1 中缺少文件。
注意:恢复到旧的、之前工作的 rtd-requirements.txt 并不能解决问题。
回购代码位于https://github.com/louking/members/tree/1.4.1.dev1/docs
具体来说,conf.py 有以下内容
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to …Run Code Online (Sandbox Code Playgroud) Sphinx与ReadTheDocs主题一起使用时是否可以隐藏侧边栏?
进一步扩展问题,我可以在发出命令时包含侧边栏:
$ 制作 html
并且不包括它发出命令:
$ make htmlhelp
不改变代码?也许在 layout.html 中添加一些东西。
我在github上有一个小型应用程序项目,该项目可在Windows上运行,并且需要pythonnet。
我的requirement.txt包含:
beautifulsoup4==4.6
pythonnet==2.3
Run Code Online (Sandbox Code Playgroud)
现在我想为它建立一个文档并放上它readthedocs.org。将文档推送到github,将项目导入之后readthedocs.org,我尝试构建文档,但是此操作失败,并显示以下信息:
Collecting pythonnet==2.3 (from -r /home/docs/checkouts/readthedocs.org/user_builds/trelloradar/checkouts/latest/requirements.txt (line 2))
Using cached pythonnet-2.3.0.tar.gz
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet: started
Running setup.py bdist_wheel for pythonnet: finished with status 'error'
Complete output from command /home/docs/checkouts/readthedocs.org/user_builds/trelloradar/envs/latest/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-iU2ADR/pythonnet/setup.py'; f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpnPH_1rpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
/bin/sh: 1: mono: not found
Traceback (most recent call …Run Code Online (Sandbox Code Playgroud) 我有一个 readthedocs sphinx 文档,它使用 nbsphinx 显示 jupyter 笔记本。当我使用 autobuild 在本地构建文档时,我在 jupyter 笔记本的代码单元格中突出显示了语法。但在 readthedocs 上,代码单元没有任何语法突出显示。
我是否必须激活某些东西才能在这些单元格中突出显示语法?
我正在使用 Sphinx 构建 Python 包的文档。
我有一个API.rst文件,其中列出了我的函数,如下所示:.. autofunction:: mymodule.foo.bar1
对于此页面自动记录的不同功能,我可以输入以下内容:
:func:`foo1`
Run Code Online (Sandbox Code Playgroud)
在 的文档字符串中foo2(),它将创建到第一个函数的链接。
但是,如果我有第二个文件API2.rst,其中我自动记录了一些其他函数,则相同的语法似乎无法找到不同页面之间的链接。甚至See Also功能也没有链接。
有没有办法跨页面指定和链接不同的功能?谢谢