Section blocks

section blocks group and provide scope for the document content.

Section blocks can be referenced, can contain metadata and can be nested within other section blocks. Building a template with sections improves clarity and re-usability.

section "<section-name>" {
  # ...
}

document "soc-activity-overview" {

  section "ExecSummary" {
    # ...
  }

  section "KPIs" {

    section "SLAs" {
      # ...
    }

    section "Coverage" {
      # ...
    }

    # ...
  }
}

When a section block is defined at the root level of the configuration file, outside of the document block, the section name is required. A combination of a block type (section) and a section name serves as a unique identifier for a block within the codebase.

If a section block is defined within the document block, the section name is optional.

Similarly to the content blocks, the section blocks are rendered in the order of definition.

Supported arguments

  • title: (optional) represents the title of the content group. It’s a syntactic sugar for a content block that renders a title. The title content block takes precedence over any other nested content blocks or section blocks defined at the same level.
  • local_var: (optional) a shortcut for specifying a local variable. See Variables for the details.

Supported nested blocks

  • meta: (optional) a block containing metadata for the block. See Metadata for details.
  • content: (optional) see Content Blocks for the details.
  • section: (optional) nested section blocks.
  • vars: (optional) a block with variable definitions. See Variables for the details.

References

See References for the details about referencing section blocks.