Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding HTML in restructured text on PyPi package pages

In Sphinx I know that you can do it:

.. 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>

In pypi, is there some way to do it?

How about a youtube video?

like image 437
Goin Avatar asked Jan 09 '12 17:01

Goin


People also ask

What is RST Sphinx?

RST stands for ReStructured Text. It is the standard markup language used for documenting python packages. Sphinx is the Python package that generates an html website from RST files, and it is what we are using to generate this site.

How do I comment in RST file?

For comments, add 2 periods .. followed by a newline and then your comment indented.


1 Answers

I don't think you can embbed random html on pypi and I'm glad you can't. Pypi should remain a Python Package Index, not a geocities clone.

If you really need to put a Youtube video on your package page you can put an image with a link to the Youtube video using standard restructured text:

.. image:: http://example.com/image-with-the-first-frame.png
   :target: http://www.youtube.com/your-video
like image 175
lgs Avatar answered Nov 11 '22 16:11

lgs