Embed

Content from an allowed service, such as a Google map.

When to use it

Content from an allowed service that has no component of its own, such as a Google map of the place.

When not to

Videos (the video component loads faster) and services that are not on the allowed list, which SeedPage refuses for the visitors' safety.

Accessibility

The frame is named by its title, which screen readers announce; write what it shows ("Map of the shop on Rua Augusta").

See it live

The component library shows this component in the default theme, in every variant: open it in the component library

The embed example as the component library shows it in the default theme

Where it is used

The starter sites that use it, each at a page that shows it:

Fields

What the component’s dialog asks for. In a Doc, keyed rows start with the key; rows in order follow the order below. One row, its cells in the order of the fields.

Field

Key

Kind

Required

Address

url

Plain text, one line

Yes

Title

title

Plain text, one line

No

Variants

This component has no variants of its own; a theme can add some.

In Google Docs

A component is a table. Its first cell names it; the rows below hold its fields. This is the example table:

embed

Map (https://www.google.com/maps/embed?pb=example)

Meeting point

In a page file

In a site kept as a folder or in Git, the same component is a block of the page’s JSON file:

JSON
{
  "name": "embed",
  "rows": [
    [
      {
        "link": "Map",
        "href": "https://www.google.com/maps/embed?pb=example"
      },
      "Meeting point"
    ]
  ]
}

Markup and classes

What the component writes takes these classes, for a theme’s CSS: the component’s own name, name__part for its parts and name--variant for each variant (the variant’s plain name is there too).

Class

What it marks

embed

The component

The HTML the example above writes, as the component library builds it in the default theme:

html
<div class="embed"><iframe src="https://www.google.com/maps/embed?pb=example" title="Meeting point" loading="lazy" sandbox="allow-scripts allow-same-origin allow-forms allow-popups"></iframe></div>

Visitor texts

Texts it shows visitors, in the page’s language. Every one is in the visitor texts reference.

Key

Text

site.embed.defaultTitle

Embedded content

Extending it

Its files in SeedPage. A theme or a site changes the markup by giving a file of the same name (the Liquid part), and a new component can extend this one.

  • src/components/embed.js
  • src/components/embed/embed.liquid