Skip to main content
Geekdocs
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Video

The video shortcode allows you to embed video files.

Usage

Define your resources in the page front matter, custom parameter params.credits is optional.

---
resources:
  - name: ferris-wheel
    src: "ferris-wheel.mp4"
    title: Stunning view of a Ferris wheel glowing with vibrant lights against the night sky.
    params:
      credits: "[Siarhei Dalivelia on pexels](https://www.pexels.com/video/vibrant-ferris-wheel-at-night-with-colorful-lights-32072019/)"
---

{{< video name="ferris-wheel" >}}

Attributes

autoplay optional bool
Enable/disable whether the video automatically begins to play back when it is loaded. See MDN for details.
Default: false
controls optional bool
Enable/disable whether the browser will offer controls to allow the user to control video playback. See MDN for details.
Default: false
loop optional bool
Enable/disable whether the video automatically begins to play back again from the start when playback reaches the end of the video. See MDN for details.
Default: false
name required string
Name of the video resource defined in the page front matter.
Default: none
preload optional string
What content to be loaded before the video is played. Supported values are none|metadata|auto. See MDN for details.
Default: auto
type optional string
The MIME media type of the video. If unspecified the browser retrieves the MIME type from the web server. See MDN for details.
Default: none

Example

Stunning view of a Ferris wheel glowing with vibrant lights against the night sky. (Siarhei Dalivelia on pexels)