ValidBlockTarget
Ensures that block types reference valid files, and that nested blocks are declared in the root-level of the schema.
Validation on block file existence
Anchor link to section titled "Validation on block file existence"This section describes the validations to ensure that block types reference valid files.
In the following example, there's no corresponding invalid.liquid
file in the blocks
directory for the theme:
In the following example, text.liquid
exists in the blocks
directory:
Validation on nested blocks
Anchor link to section titled "Validation on nested blocks"This section describes the validations that occur on blocks nested within presets
.
In this example, neither the nested block nested-block
nor @theme
are declared in the root-level blocks array:
In this example, _private_block
is a private block which hasn't been explicitly declared in the root-level blocks array:
In this example, @theme
is declared in the root-level blocks array:
In this example, the private block _private_block
is declared in the root-level blocks array:
The following example contains the default configuration for this check:
Parameter | Description |
---|---|
enabled |
Whether this check is enabled. |
severity |
The severity of the check. |
Disabling this check
Anchor link to section titled "Disabling this check"Disabling this check isn't recommended.