codeninjasuk.github.io/docs/_posts/2017-01-23-layout-header-video.md
2023-07-18 16:33:33 +01:00

1.4 KiB

title header categories tags
Layout: Header Video
video
id provider
-PVofD2A9t8 youtube
Layout
Uncategorized
video
layout

This post should display a header with a responsive video, if the theme supports it.

Settings

Parameter Required Description
id Required ID of the video
provider Required Hosting provider of the video, either youtube or vimeo

YouTube

To embed the following YouTube video at url https://www.youtube.com/watch?v=-PVofD2A9t8 (long version) or https://youtu.be/-PVofD2A9t8 (short version) into a post or page's main content you'd use:

{% raw %}{% include video id="-PVofD2A9t8" provider="youtube" %}{% endraw %}

{% include video id="-PVofD2A9t8" provider="youtube" %}

To embed it as a video header you'd use the following YAML Front Matter

header:
  video:
    id: -PVofD2A9t8
    provider: youtube

Vimeo

To embed the following Vimeo video at url https://vimeo.com/212731897 into a post or page's main content you'd use:

{% raw %}{% include video id="212731897" provider="vimeo" %}{% endraw %}

{% include video id="212731897" provider="vimeo" %}

To embed it as a video header you'd use the following YAML Front Matter

header:
  video:
    id: 212731897
    provider: vimeo