Skip to content

Commit

Permalink
oEmbed: Add dedicated page
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 24, 2025
1 parent 270e0f5 commit cceddc9
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/myst/oembed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(oembed-md)=

# oEmbed widgets


## About

[oEmbed] is a format for allowing an embedded representation of a URL on
third party sites. The simple API allows a website to display embedded
content (such as photos or videos) when a user posts a link to that
resource, without having to parse the resource directly.

Client-side implementations of oEmbed, like [oEmbedPy], 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].


## Examples

### Bluesky
:::{oembed} https://bsky.app/profile/simonprickett.dev/post/3lgizsidy722u
:::

### Twitter/X
:::{oembed} https://x.com/simon_prickett/status/1882858717571641581
:::

### YouTube
:::{oembed} https://www.youtube.com/watch?v=YE7VzlLtp-4
:maxwidth: 480
:maxheight: 320
:::


[oEmbed]: https://oembed.com/
[oEmbedPy]: https://oembedpy.readthedocs.io/
[providers.json]: https://oembed.com/providers.json
42 changes: 42 additions & 0 deletions docs/rst/oembed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.. _oembed-rst:

##############
oEmbed widgets
##############

=====
About
=====

`oEmbed`_ is a format for allowing an embedded representation of a URL on
third party sites. The simple API allows a website to display embedded
content (such as photos or videos) when a user posts a link to that
resource, without having to parse the resource directly.

Client-side implementations of oEmbed, like `oEmbedPy`_, 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].

========
Examples
========

Bluesky
=======
.. oembed:: https://bsky.app/profile/simonprickett.dev/post/3lgizsidy722u

Twitter/X
=========
.. oembed:: https://x.com/simon_prickett/status/1882858717571641581

YouTube
=======
.. oembed:: https://www.youtube.com/watch?v=YE7VzlLtp-4
:maxwidth: 480
:maxheight: 320


.. _oEmbed: https://oembed.com/
.. _oEmbedPy: https://oembedpy.readthedocs.io/
.. _providers.json: https://oembed.com/providers.json

0 comments on commit cceddc9

Please sign in to comment.