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
| Argument | Type | Description |
|---|---|---|
templates | map[string]BlockType | The templates value. |
Returns
The declared result.
*BlockDefinitionsFull signature
func NewBlockDefinitions(templates map[string]BlockType) *BlockDefinitionsRelated types
BlockTypeOne normalized discriminated block layout.
BlockDefinitionsBlockDefinitions 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.