Schema Once Per File
Identifies files that contain more than one {% schema %} tag. Theme Check reports the second and later schema tags because {% schema %} can appear only once per file.
Each section or block file should define a single schema so Shopify can parse one settings definition for the file.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
In the following example, sections/product.liquid contains two {% schema %} tags:
Anchor to ✓ Pass✓ Pass
In the following example, sections/product.liquid contains one {% schema %} tag:
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. If you can't avoid violating the rule, then you should disable the check using the comment syntax. This ensures that you intentionally disable the check for each instance.