function

NewBlockDefinitions

NewBlockDefinitions shares templates, a map of definition-relative blocks by slug. The caller must not change a template once a placement or definition view may have read it.

Arguments

ArgumentTypeDescription
templatesmap[string]BlockTypeThe templates value.

Returns

The declared result.

*BlockDefinitions

Full signature

Related types

  • BlockType

    One normalized discriminated block layout.

  • BlockDefinitions

    BlockDefinitions holds the block definitions of one schema and the definition views shared by all of their placements. A builder may add definitions while it resolves configuration; views are created on first use.