如何强制将文件 (mp4) 从 github 传输到 readthedocs
How to force a file (mp4) to transfer from github to readthedocs
我在 github 上有一个存储库:
https://github.com/springer-math/Mathematics-of-Epidemics-on-Networks
其中有一个文件
docs/SIR_2dgrid.mp4
其中包含我希望出现在 readthedocs 文档中的动画(特别是在此页面:http://epidemicsonnetworks.readthedocs.io/en/latest/Simulation_Investigation.html)
此外,还有一个文件
docs/Simulation_Investigation.rst
它对该页面进行编码并尝试引用该 mp4。我尝试了很多变体(尝试在 https://groups.google.com/d/msg/sphinx-users/_z00m3zoRAY/Ryx4D5sxgtcJ 复制指令),但没有成功。我可以让 mp4 出现在所需的 readthedocs 页面上的唯一方法是 link 到 github 上的 mp4(但它有一点延迟加载,并不完美)。
我似乎无法让 readthedocs 将 mp4 复制到一个目录中,在该目录中我可以为它创建一个 link 亲戚。
有没有办法让 readthedocs 将该文件复制到我可以 link 到的地方?
或者,除了将 mp4 放到另一个网站上之外,还有其他方法可以在 readthedocs 中嵌入视频吗?
将静态文件(您的 .mp4)放在名为 _static
.
的子目录中
然后在您的 conf.py
中,将 html_static_path
的值设置为该子目录。
html_static_path = '_static'
构建文档时会复制静态资源。
我在 github 上有一个存储库:
https://github.com/springer-math/Mathematics-of-Epidemics-on-Networks
其中有一个文件
docs/SIR_2dgrid.mp4
其中包含我希望出现在 readthedocs 文档中的动画(特别是在此页面:http://epidemicsonnetworks.readthedocs.io/en/latest/Simulation_Investigation.html) 此外,还有一个文件
docs/Simulation_Investigation.rst
它对该页面进行编码并尝试引用该 mp4。我尝试了很多变体(尝试在 https://groups.google.com/d/msg/sphinx-users/_z00m3zoRAY/Ryx4D5sxgtcJ 复制指令),但没有成功。我可以让 mp4 出现在所需的 readthedocs 页面上的唯一方法是 link 到 github 上的 mp4(但它有一点延迟加载,并不完美)。
我似乎无法让 readthedocs 将 mp4 复制到一个目录中,在该目录中我可以为它创建一个 link 亲戚。
有没有办法让 readthedocs 将该文件复制到我可以 link 到的地方?
或者,除了将 mp4 放到另一个网站上之外,还有其他方法可以在 readthedocs 中嵌入视频吗?
将静态文件(您的 .mp4)放在名为 _static
.
然后在您的 conf.py
中,将 html_static_path
的值设置为该子目录。
html_static_path = '_static'
构建文档时会复制静态资源。