Skip to content

Commit

Permalink
Video: Add Vimeo example, and refer to oEmbed page
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 24, 2025
1 parent cceddc9 commit 78dd19d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
21 changes: 11 additions & 10 deletions docs/myst/video.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Videos

Videos, for example from YouTube or Vimeo, can be embedded using inline
HTML, [sphinxcontrib-youtube], or [oembedpy].
HTML, [sphinxcontrib-youtube], or [oEmbedPy].

## Inline HTML

Expand All @@ -12,11 +12,16 @@ into the Markdown file. Voilà.

## sphinxcontrib-youtube

This uses the `youtube` directive provided by `sphinxcontrib-youtube`.
This uses the `youtube` and `vimeo` directives provided by `sphinxcontrib-youtube`.

:::{rubric} YouTube
:::
:::{youtube} YE7VzlLtp-4
:width: 480
:height: 320
:::

:::{rubric} Vimeo
:::
:::{vimeo} 1084537
:::

## oembedpy
Expand All @@ -29,13 +34,9 @@ This uses the `oembed` directive provided by `oembedpy`.
:::

:::{tip}
[oEmbedPy], as the name suggests, can render [oEmbed] information provided
by any HTML page, for example Bluesky, Reddit, Twitter/X, and many more.
Registered oEmbed providers can be explored per [providers.json].
See {ref}`oembed-md` to learn about all capabilities of the `oembed` directive.
:::


[oEmbed]: https://oembed.com/
[oembedpy]: https://oembedpy.readthedocs.io/
[providers.json]: https://oembed.com/providers.json
[oEmbedPy]: https://oembedpy.readthedocs.io/
[sphinxcontrib-youtube]: https://sphinxcontrib-youtube.readthedocs.io/
16 changes: 7 additions & 9 deletions docs/rst/video.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ into the Markdown file. Voilà.
sphinxcontrib-youtube
=====================

This uses the ``youtube`` directive provided by ``sphinxcontrib-youtube``.
This uses the ``youtube`` and ``vimeo`` directives provided by ``sphinxcontrib-youtube``.

.. rubric:: YouTube
.. youtube:: YE7VzlLtp-4
:width: 480
:height: 320

.. rubric:: Vimeo
.. vimeo:: 1084537

oembedpy
========
Expand All @@ -35,12 +37,8 @@ This uses the ``oembed`` directive provided by ``oembedpy``.

.. tip::

`oEmbedPy`_, as the name suggests, can render `oEmbed`_ information provided
by any HTML page, for example Bluesky, Reddit, Twitter/X, and many more.
Registered oEmbed providers can be explored per `providers.json`_.
See :ref:`oembed-rst` to learn about all capabilities of the ``oembed`` directive.


.. _oEmbed: https://oembed.com/
.. _oembedpy: https://oembedpy.readthedocs.io/
.. _providers.json: https://oembed.com/providers.json
.. _oEmbedPy: https://oembedpy.readthedocs.io/
.. _sphinxcontrib-youtube: https://sphinxcontrib-youtube.readthedocs.io/

0 comments on commit 78dd19d

Please sign in to comment.