Where it sits
| Body | In the body | Inside its texts |
|---|---|---|
| The store’s home | Yes | Yes |
| A custom page | Yes | Yes |
| A product’s page | Yes | Yes |
| An event’s page | Yes | Yes |
| A portfolio’s page | Yes | Yes |
| A lesson | Yes | Yes |
| An article | Yes | Yes |
A text holds it as a <block type="titled-section" props="…"></block> element: its props are those below but type, which the element’s own type names.
See Bodies for how a body holds its blocks.
It holds other blocks: each nested block is one of the types this reference lists that its body takes, as the whole block schema reads it.
Props
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | The block’s id, unique within its body. |
type |
"titled-section" |
Yes | The block’s type. |
title |
string |
No | The heading. |
subtitle |
string |
No | A line under the heading. |
description |
string |
No | A paragraph under the heading. |
eyebrow |
string |
No | A short line over the heading. |
alignment |
"start" or "center" or "end" |
No | How its content aligns: start, center or end. |
blocks |
block or array of block |
No | The blocks it holds; a single block is read as a list of one. |
block |
block |
No | |
hidden |
boolean |
No | Whether the block is hidden: it, and every block it holds, doesn’t show. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The block's id, unique within its body."
},
"type": {
"type": "string",
"const": "titled-section",
"description": "The block's type."
},
"title": {
"type": "string",
"description": "The heading."
},
"subtitle": {
"type": "string",
"description": "A line under the heading."
},
"description": {
"type": "string",
"description": "A paragraph under the heading."
},
"eyebrow": {
"type": "string",
"description": "A short line over the heading."
},
"alignment": {
"type": "string",
"enum": [
"start",
"center",
"end"
],
"description": "How its content aligns: `start`, `center` or `end`."
},
"blocks": {
"anyOf": [
{
"$ref": "https://docs.sherpo.io/overview/blocks/schema.json"
},
{
"type": "array",
"items": {
"$ref": "https://docs.sherpo.io/overview/blocks/schema.json"
}
}
],
"description": "The blocks it holds; a single block is read as a list of one."
},
"block": {
"$ref": "https://docs.sherpo.io/overview/blocks/schema.json",
"description": "One block it holds, read when `blocks` is unset or empty. An older form of `blocks`."
},
"hidden": {
"type": "boolean",
"description": "Whether the block is hidden: it, and every block it holds, doesn't show."
}
},
"required": [
"id",
"type"
],
"description": "A section of blocks under a heading.",
"additionalProperties": false
}