blog.skypress.content.gutenberg

skypress.blog

Documentation

A WordPress Gutenberg block tree, the canonical content of a SkyPress document. Placed inside the open `content` union of a `site.standard.document`. Readers that don't understand this format should fall back to the document's `textContent`.

main object

A WordPress Gutenberg block tree, the canonical content of a SkyPress document. Placed inside the open `content` union of a `site.standard.document`. Readers that don't understand this format should fall back to the document's `textContent`.

Properties

blocks array of unknown Required

The Gutenberg block tree exactly as produced by the editor's `onSaveBlocks` (NOT rendered HTML). Each item is a block node: `{ name: string, attributes: object, innerBlocks: block[] }`, where `name` is the Gutenberg block name (e.g. `core/paragraph`). Items are typed `unknown` because block attributes are open-ended per block type.

mentions array of unknown Optional

Optional, additive. Accounts mentioned in the body, mirrored from the inline `<a data-did>` anchors in the block tree. A flat discovery list for other appviews; SkyPress's own reader renders mentions from the inline anchors, not this field. Each item is `{ did: string, handle: string }`.

version integer Required

Serialization version of the block tree. Bump only for breaking changes; non-breaking changes are additive. Currently 1.

minimum: 1
View raw schema
{
  "type": "object",
  "required": [
    "version",
    "blocks"
  ],
  "properties": {
    "blocks": {
      "type": "array",
      "items": {
        "type": "unknown"
      },
      "description": "The Gutenberg block tree exactly as produced by the editor's `onSaveBlocks` (NOT rendered HTML). Each item is a block node: `{ name: string, attributes: object, innerBlocks: block[] }`, where `name` is the Gutenberg block name (e.g. `core/paragraph`). Items are typed `unknown` because block attributes are open-ended per block type."
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "description": "Serialization version of the block tree. Bump only for breaking changes; non-breaking changes are additive. Currently 1."
    },
    "mentions": {
      "type": "array",
      "items": {
        "type": "unknown"
      },
      "description": "Optional, additive. Accounts mentioned in the body, mirrored from the inline `<a data-did>` anchors in the block tree. A flat discovery list for other appviews; SkyPress's own reader renders mentions from the inline anchors, not this field. Each item is `{ did: string, handle: string }`."
    }
  },
  "description": "A WordPress Gutenberg block tree, the canonical content of a SkyPress document. Placed inside the open `content` union of a `site.standard.document`. Readers that don't understand this format should fall back to the document's `textContent`."
}

Lexicon Garden

@