Skip to main content

UnrecognizedContentForArguments

All arguments provided when rendering a static block must match the arguments defined in that block's LiquidDoc.


The following examples contain code snippets that either fail or pass this check. All examples refer to the following block that defines two parameters (one optional, indentified by square brackets; one required).

blocks/example-block.liquid

{% doc %}
@param {string} some_str
@param {number} [some_num]
{% enddoc %}

In the following example, the static block is being rendered with an unrecognized argument:

sections/section.liquid

{% content_for 'block', type: 'example-block', some_str: 'text', some_num: 1, some_bool: false %}

In the following example, the static block is being rendered with a recognized argument:

sections/section.liquid

{% content_for 'block', type: 'example-block', some_str: 'text', some_num: 1 %}

The following example contains the default configuration for this check:

UnrecognizedContentForArguments:
enabled: true
severity: warning
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?