SEO
The seo field: a per-locale search title and description and their social-sharing pair, with length warnings, the stored shape, and how head() uses it.
An seo field holds the copy a search results page and a shared link show for a document: a title, a description, and optionally a different title and description for social sharing. It is translated per locale. Declare it under any name that is not reserved (seo itself is reserved): meta is conventional.
fields:
- name: meta
type: seo
title_max: 60
description_max: 155
label: { en-GB: Search and sharing } Parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
title_max | whole number | 60 | The title length a warning starts at. |
description_max | whole number | 160 | The description length a warning starts at. |
A results page truncates rather than refuses, so these are warnings, never errors:
| Code | Path | When |
|---|---|---|
max_length | <name>.title | The title is longer than title_max. |
max_length | <name>.description | The description is longer than description_max. |
seo_description_short | <name>.description | The description is under 50 characters. |
The editor shows a title input and a description box, with the social pair behind a disclosure that starts open when either is written.
Stored value and template value
{ "title": "Hook Norton Brewery tours", "description": "A Victorian tower brewery...", "og_title": "", "og_description": "" } A template receives title, description, og_title and og_description. You rarely print them yourself: head() writes the page’s title, meta description and Open Graph and Twitter tags from the type’s first seo field, each social value falling back to the search one on its own (SEO and structured data).
<head>
{{ head() }}
</head> A document’s own seo title and description replace the generated ones only where they are written; an empty one leaves the generated copy, which is the document’s title and its summary. On an engine-dmo landing page, the content document’s seo field gives the social pair. An seo field is not projected into the query index.
Video
The video field: a YouTube or Vimeo video, a media library video or an .mp4/.webm file on an allowed host, with poster, captions confirmation, title and transcript, rendered through a privacy facade.
Form
The form field: lets an editor place one of the site's declared form endpoints on a page, with the endpoints it may offer, the checks, and the form value templates render.