在PyPi包页面上的重构文本中嵌入HTML

Goi*_*oin 12 python restructuredtext pypi python-sphinx

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>
Run Code Online (Sandbox Code Playgroud)

pypi,有没有办法做到这一点?

youtube视频怎么样?

小智 7

我不认为你可以在pypi上嵌入随机的html,我很高兴你不能.Pypi应该仍然是Python Package Index,而不是geocities clone.

如果您确实需要在包装页面上放置Youtube视频,可以使用标准重组文本将带有Youtube视频链接的图像放入:

.. image:: http://example.com/image-with-the-first-frame.png
   :target: http://www.youtube.com/your-video
Run Code Online (Sandbox Code Playgroud)


Dra*_*kar 6

PyPI的重点是模块包索引,用于快速参考和访问Python模块和包.它不是一个可定制的媒体网站.您可以将相当数量的信息添加到您放入其中的模块和软件包的索引页面,但它不适用于索引站点以外的任何内容.

如果您想要更详细的文档以及更加个性化的感觉,请使用http://packages.python.org,您可以通过包编辑页面上传内容:http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=YOURPACKAGE其中YOURPACKAGE是您上传到PyPI的打包的名称.

  • 我不想要"像托管多媒体内容的东西". (2认同)