Skip to content

file.BlockI

BlockI returns the contents of a given block with an indentation nuance that if the block is empty, it will not add a newline to the output.

go
## <<Stencil::Block(name)>>
## <</Stencil::Block>>

## <<Stencil::Block(name)>>
{{- /* Has no newline if no contents, due to the - at the block prefix */ }}
{{- file.BlockI "name" }}
## <</Stencil::Block>>