Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
Docs
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License

Video

Share via
Hinode
Link copied to clipboard

Use the video shortcode to embed a responsive video on your site.

On this page
Overview   Arguments   Configuration   Examples   Video   Vimeo   YouTube  

Overview  

  Important

Hinode uses a strict Content Security Policy by default. Be sure your server configuration safe lists your video provider in the frame-src configuration, or your video will not show. You can modify the safe list in the Server Headers.

Use the video shortcode to embed a responsive video on your site. The shortcode currently supports three providers, being Cloudinary  , Vimeo  , and YouTube  . The last two providers also support shorthand notation. As an example, the following shortcode displays a Hugo quickstart guide:

markdown
{{< youtube w7Ft2ymGmfc >}}

Arguments  

The shortcode supports the following arguments:

Name Type Required Default Comment
account string v0.26.5      Account name of the video asset, required by some digital asset managers. You can also set the default account name in the site’s parameters.
autoplay bool false Flag indicating the video should start playing immediately when loaded, if supported by the browser. The audio will be muted.
autotitle bool false v0.25.2      Trigger to retrieve the title from the video metadata, if supported by the provider.
class string Class attribute of the video wrapper element.
host string youtube v0.26.5      Host name of the video provider. It should match one of the registered providers in the site’s parameters under videos.
id string yes Public ID of the video to be embedded.
options string v0.28.2      Optional query parameters to append to video asset’s url. The query string is prepended with a ? symbol. Only applicable to Cloudinary.
page *hugolib.pageState, *hugolib.pageForShortcode yes v0.26.5      Context of the current page.
position text.Position v0.26.5      Filename and position from which the shortcode was called.
ratio select v0.26.5      Ratio of the video. If set, determines the padding of the embedded video frame. When not specified, the video dimensions used to calculate the padding are retrieved programmatically. Supported values: [1x1, 3x2, 4x3, 16x9, 21x9].
title string Title of the video. You can also set autotitle to retrieve the title programmatically at build time, if supported by the provider.
Name Type Required Default
account string
v0.26.5      Account name of the video asset, required by some digital asset managers. You can also set the default account name in the site’s parameters.
autoplay bool false
Flag indicating the video should start playing immediately when loaded, if supported by the browser. The audio will be muted.
autotitle bool false
v0.25.2      Trigger to retrieve the title from the video metadata, if supported by the provider.
class string
Class attribute of the video wrapper element.
host string youtube
v0.26.5      Host name of the video provider. It should match one of the registered providers in the site’s parameters under videos.
id string yes
Public ID of the video to be embedded.
options string
v0.28.2      Optional query parameters to append to video asset’s url. The query string is prepended with a ? symbol. Only applicable to Cloudinary.
page *hugolib.pageState, *hugolib.pageForShortcode yes
v0.26.5      Context of the current page.
position text.Position
v0.26.5      Filename and position from which the shortcode was called.
ratio select
v0.26.5      Ratio of the video. If set, determines the padding of the embedded video frame. When not specified, the video dimensions used to calculate the padding are retrieved programmatically. Supported values: [1x1, 3x2, 4x3, 16x9, 21x9].
title string
Title of the video. You can also set autotitle to retrieve the title programmatically at build time, if supported by the provider.

Configuration  

Hinode supports Cloudinary  , Vimeo  , and YouTube  as video provider. You can configure these providers in your site parameters. Hinode uses the following configuration by default:

  • config/_default/params.toml
[videos]
    [videos.cloudinary]
        host = "cloudinary"
        account = "demo"
    [videos.vimeo]
        host = "vimeo"
    [videos.youtube]
        host = "youtube"
...

Examples  

Embed a responsive video by specifying the hosting provider.

Video  

As an example, the following shortcode displays an Elephants video hosted by Cloudinary. Cloudinary requires both an account name and a public ID of the video. You can provide the account name as shortcode argument, or Configure a Default Account Name in the site’s parameters.

markdown
{{< video host="cloudinary" account="demo" id="elephants" autoplay=true >}}

Vimeo  

  Important

Since Hinode v0.27.3  you need to explicitly add vimeo to your page’s Optional Modules to ensure compliance with the Content Security Policies. When setting EnableDNT  to true, the Vimeo player will be blocked from tracking any session data, including all cookies and stats.

As an example, the following shortcode displays a Vimeo video. By setting autotitle to true, Hinode captures the video’s title as defined by Vimeo and assigns this to the title of the video frame.

markdown
{{< vimeo id="55073825" autoplay=true autotitle=true >}}

YouTube  

  Note

In Privacy-Enhanced Mode  , YouTube will not store information about visitors on your website unless the user plays the embedded video.

As an example, the following shortcode displays a Hugo quickstart guide hosted by YouTube.

markdown
{{< youtube id="w7Ft2ymGmfc" autoplay=true autotitle=true >}}
• Update to Hinode v0.27.13 (b6f5054)
On this page:
Overview   Arguments   Configuration   Examples   Video   Vimeo   YouTube  
Video
Video
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.29.3
Privacy | Cookies
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting Started 
Developing Modules 
Optimization 
Versioning 
Community
Issues   
Discussions   
Contribute 
Hinode
Code copied to clipboard