# Embed YouTube video in Documenter?

**URL:** <https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244>\
**Category:** Tooling\
**Created:** [January 30, 2021, 1:45am UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244 "2021-01-30T01:45:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 30, 2021, 1:45am UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244/1 "2021-01-30T01:45:35Z")

</div>

Is it possible to embed a youtube video in a Documenter generated page?

Thank you.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [January 30, 2021, 1:48am UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244/2 "2021-01-30T01:48:13Z")

</div>

You should be able to put the required HTML in a Documenter [`@raw html`](https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@raw-format-block) block.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 30, 2021, 3:20pm UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244/3 "2021-01-30T15:20:36Z")

</div>

Almost there. For some reason it seems that the height of the video is being ignored, and it looks a little odd. For example:

–

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/a/eab3309dbabf1885c7523ea47d0afa3241bba132.png)

–

I am using this to embed the video (the default youtube link). Any idea why the video is appearing without the proper height?

````julia

# Videos

## Cellulose foam 

### With non-hydrolyzed fibers (Micro-CT)

```@raw html
<center>
<iframe width="560" height="315" src="https://www.youtube.com/embed/xZg-A2NX7hU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>

````

```julia

```

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 30, 2021, 4:30pm UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244/4 "2021-01-30T16:30:04Z")

</div>

Setting the height with `style="height:315px"` worked (no idea why). This worked fine, then:

````julia
```@raw html
<center>
<iframe width="500" style="height:315px" src="https://www.youtube.com/embed/xZg-A2NX7hU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>

````

```julia

```

---

<div class="post-metadata">

**Author:** ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Post date:** [June 15, 2021, 10:17pm UTC](https://discourse.julialang.org/t/embed-youtube-video-in-documenter/54244/5 "2021-06-15T22:17:21Z")

</div>

Helps with rendered Pluto notebooks as well…
