Nuxtstop

For all things nuxt.js

How to embed YouTube videos into dev.to posts

5 1

First, go to the Youtube video you'd like to embed and have a look at the url, it should look something like this:

https://www.youtube.com/watch?v=<your-video-url>
Enter fullscreen mode Exit fullscreen mode

Right after the v= part you should find your video id, so for example in the following case l4kFO6VQPfA would be our id:

https://www.youtube.com/watch?v=l4kFO6VQPfA&t=1s
Enter fullscreen mode Exit fullscreen mode

Now, create a new post on dev.to and add the following liquid tag:

{% youtube <your-video-id> %}
Enter fullscreen mode Exit fullscreen mode

So, in our example it would be:

{% youtube l4kFO6VQPfA %}
Enter fullscreen mode Exit fullscreen mode

Important: Do not copy other parts of the url. For example in our case we did not copy &t=1s at the end of the url.

Hope this was helpful :-)

Links