Skip to content

Adding video to you website

Linking vs storing in you repo

You might want to add video to you website you can either link a video or add it to your repo. We recommend putting videos your making your self in your repo. If they are short size should not be a problem. This makes it less likely to break in the future.

The format we recommend using is .mp4

if you are sharing videos from youtube it's easy in markdown to do it the same way you link a website with:

[Here is a video](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
Here is a video

This way makes a working link but there's no thumbnail if you want that you can use the html Iframe:

<iframe src="https://streamable.com/e/yslhdu" allowfullscreen></iframe>

Linking a video from your repo

There are two ways we know how to do this first you can use html since that works with markdown the other way is to use a mk docs plugin.

HTML

To use html you can use the code below:

<video width="100%" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

Mk docs plugin

To use this you must change you CI build file and add a the .yml file. Then you can use this code below:

# Video example

Lorem ipsum dolor sit amet

![type:video](./videos/costa_rica.mp4)

You can also use it to link videos on the web

# Video example

Lorem ipsum dolor sit amet

![type:video](https://www.youtube.com/embed/LXb3EKWsInQ)

how to set up the plugin