fix embed 2

This commit is contained in:
Julie Kirsch 2025-03-03 22:12:17 +01:00
parent 313d811ad1
commit 8a0b9e0a1b

View file

@ -6,18 +6,28 @@ To help you illustrate your content, it can be sueful to add some type of visual
````{tab-item} Linking
In Jupyter Book, you can embed a YouTube video using the `{iframe}` directive, ensuring you use the embed URL format.
```md
```{iframe} https://www.youtube.com/embed/watch?v=gbBsWo6em4c
:width: 700
:height: 400
```{iframe} https://www.youtube.com/embed/x2eonqw5M6o
---
width: 80%
align: center
name: my_linked_video
---
<caption>
```
```
For example, the above code cell, will result in the following video.
```{iframe} https://www.youtube.com/embed/watch?v=gbBsWo6em4c
:width: 700
:height: 400
```{iframe} https://www.youtube.com/embed/x2eonqw5M6o
---
width: 80%
align: center
name: my_linked_video
---
<caption>
```
To link and display an online figure, you can use the `{figure}` directive, which also allows captions and references.
@ -25,18 +35,23 @@ To link and display an online figure, you can use the `{figure}` directive, whic
```md
```{figure} https://town-n-country-living.com/wp-content/uploads/2023/06/craftsman-exterior.jpg
:width: 700
:height: 400
My new figure
---
width: 80%
align: center
name: my_linked_figure
---
<caption>
```
```
```{figure} https://town-n-country-living.com/wp-content/uploads/2023/06/craftsman-exterior.jpg
:width: 700
:height: 400
My new figure
---
width: 80%
align: center
name: my_linked_figure
---
<caption>
```
````