Videos

Add a video with a Doks shortcode.

On this page

  1. ./layouts/shortcode/video.html

Usage

  1. {{< video ratio="16x9" attributes="controls autoplay muted" webm-src="videos/flower.webm" mp4-src="videos/flower.mp4" >}}
ParametersValues
ratio<1x1 | 4x3 | 16x9 | 21x9>
attributes[Attributes]
webm-src[path/to/file.webm]
mp4-src[path/to/file.mp4]

Renders

  1. <div class="ratio ratio-16x9">
  2. <video controls autoplay muted>
  3. <source src="/videos/flower.webm" type="video/webm">
  4. <source src="/videos/flower.mp4" type="video/mp4">
  5. Sorry, your browser doesn't support embedded videos.
  6. </video>
  7. </div>
Sorry, your browser doesn’t support embedded videos.

Resources