python - 在 PyPi 包页面上的重组文本中嵌入 HTML

标签 python python-sphinx restructuredtext pypi

Sphinx我知道你可以做到:

.. raw:: html

    <div style="margin-top:10px;">
      <iframe width="560" height="315" src="http://www.youtube.com/embed/_EjisXtMy_Y" frameborder="0" allowfullscreen></iframe>
    </div>

pypi ,有什么办法吗?

youtube 视频怎么样?

最佳答案

我不认为你可以在 pypi 上嵌入随机 html,我很高兴你不能。 Pypi 应该保留为 Python 包索引,而不是 geocities 克隆。

如果您真的需要在您的包裹页面上放一个 Youtube 视频,您可以使用标准的重组文本放一张带有 Youtube 视频链接的图片:

.. image:: http://example.com/image-with-the-first-frame.png
   :target: http://www.youtube.com/your-video

关于python - 在 PyPi 包页面上的重组文本中嵌入 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8792817/

相关文章:

Python 可执行文件到 Linux 列表文件的大小

python - 如何在 Sphinx 中为 Python 类/属性/常量/方法指定别名?

python - Sphinx(适用于 Python)- 搜索栏消失

python-2.7 - 狮身人面像 : Linking to Embedded Binary Files (PDFs)

python - 如何找到 wx.CheckBoxState 的 intersphinx 映射

python - Pyspark - 将多列数据组合成一个跨行分布的列

python - 无法用 pickle 序列化 pygame.Surface 对象

python - 制作htmlhelp时如何使用Sphinx RTD主题隐藏侧边栏

vim - 有没有一个插件可以在 vim 中显示 rst 的轮廓

python - 使用pytorch获取形状(4,1,84,84)