Skip to content

faq

Questions and their answers.

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="faq" 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 "faq" Yes The block’s type.
items array of object Yes Each question, its answer (blocks; a plain text becomes a markdown block, blank lines separating its paragraphs) and an optional category to group it under.
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": "faq",
      "description": "The block's type."
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "https://docs.sherpo.io/overview/blocks/schema.json"
                }
              }
            ]
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "question"
        ],
        "additionalProperties": false
      },
      "description": "Each question, its answer (blocks; a plain text becomes a `markdown` block, blank lines separating its paragraphs) and an optional `category` to group it under."
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether the block is hidden: it, and every block it holds, doesn't show."
    }
  },
  "required": [
    "id",
    "type",
    "items"
  ],
  "description": "Questions and their answers.",
  "additionalProperties": false
}

Type to search…

↑↓ navigate↵ selectEsc close