ValidBlockTarget
Ensures that block types reference valid files, and that nested blocks are declared in the root-level of the schema.
Anchor to Validation on block file existenceValidation on block file existence
This section describes the validations to ensure that block types reference valid files.
Anchor to ✗ Fail✗ Fail
In the following example, there's no corresponding invalid.liquid
file in the blocks
directory for the theme:
Anchor to ✓ Pass✓ Pass
In the following example, text.liquid
exists in the blocks
directory:
Anchor to Validation on nested blocksValidation on nested blocks
This section describes the validations that occur on blocks nested within presets
.
Anchor to ✗ Fail✗ Fail
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:
Anchor to ✓ Pass✓ Pass
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:
Anchor to OptionsOptions
The following example contains the default configuration for this check:
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.