This check exists to prevent rendering resources with the render
tag, section
tag (and the deprecated include
tag) that do not exist.
This check is aimed at preventing liquid rendering errors.
👎 Example of incorrect code for this check:
{% render 'snippet-that-does-not-exist' %}
👍 Example of correct code for this check:
{% render 'article-card' %}
The default configuration for this check is the following:
MissingTemplate:
enabled: true
ignore_missing: []
Specify a list of patterns of missing template files to ignore.
While the ignore
option will ignore all occurrences of MissingTemplate
according to the file in which they appear, ignore_missing
allows ignoring all occurrences of MissingTemplate
based on the target template, the template being rendered.
For example:
MissingTemplate:
ignore_missing:
- snippets/icon-*
Would ignore offenses on {% render 'icon-missing' %}
across all theme files.
MissingTemplate:
ignore:
- templates/index.liquid
Would ignore all MissingTemplate
in templates/index.liquid
, no mater the file being rendered.
This check has been introduced in Theme Check 0.1.0.