Video

A base component that renders a video.

The video is rendered in a model overlay.

  video:
    inline: false
    src: youtube
    id: "eu5lv2Umn3M"
    tn: "v1649365834/metalsmith-components/deepPurple_nvqi3g.jpg"
    aspectRatio: "56.25"
    caption: ""
  • inline - When false, plays video in a modal overlay
  • src - The video source, currently only YouTube is supported
  • id - The video id, something like eu5lv2Umn3M
  • tn - A video thumbnail
  • aspectRation - the aspect ratio of the image. Used to prevent any content movement when the high-res image in inserted into the DOM.
  • caption - used it to give credit or whatever makes sense.

Renders in a modal overlay

  video:
    inline: true
    src: youtube
    id: "OorZcOzNcgE"
    tn: "v1649962060/metalsmith-components/deepPurple2_d05gj3.jpg"
    aspectRatio: "56.25"
    caption: ""

For an usage example see the media section.

Renders inline

Base Components Library

Library of all code snippets for the base components