Sha256: 0b2a1f623e9826ee9a00440a6d9e3f1c58ecbafc2f5701c2609d352df4fdccdf

Contents?: true

Size: 1.33 KB

Versions: 18

Compression:

Stored size: 1.33 KB

Contents

# Discourage the use of `include` (`ConvertIncludeToRender`)

The `include` tag is [deprecated][deprecated]. This tag exists to enforce the use of the `render` tag instead of `include`.

The `include` tag works similarly to the `render` tag, but it lets the code inside of the snippet to access and overwrite the variables within its parent theme file. The `include` tag has been deprecated because the way that it handles variables reduces performance and makes theme code harder to both read and maintain.

## Check Details

This check is aimed at eliminating the use of `include` tags.

:-1: Examples of **incorrect** code for this check:

```liquid
{% include 'snippet' %}
```

:+1: Examples of **correct** code for this check:

```liquid
{% render 'snippet' %}
```

## Check Options

The default configuration for this check is the following:

```yaml
ConvertIncludeToRender:
  enabled: true
```

## When Not To Use It

It is discouraged to disable this rule.

## Version

This check has been introduced in Theme Check 0.1.0.

## Resources

- [Deprecated Tags Reference][deprecated]
- [Rule Source][codesource]
- [Documentation Source][docsource]

[deprecated]: https://shopify.dev/docs/themes/liquid/reference/tags/deprecated-tags#include
[codesource]: /lib/theme_check/checks/convert_include_to_render.rb
[docsource]: /docs/checks/convert_include_to_render.md

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
theme-check-1.15.0 docs/checks/convert_include_to_render.md
theme-check-1.14.0 docs/checks/convert_include_to_render.md
theme-check-1.13.0 docs/checks/convert_include_to_render.md
theme-check-1.12.1 docs/checks/convert_include_to_render.md
theme-check-1.12.0 docs/checks/convert_include_to_render.md
theme-check-1.11.0 docs/checks/convert_include_to_render.md
theme-check-1.10.3 docs/checks/convert_include_to_render.md
theme-check-1.10.2 docs/checks/convert_include_to_render.md
theme-check-1.10.1 docs/checks/convert_include_to_render.md
theme-check-1.10.0 docs/checks/convert_include_to_render.md
theme-check-1.9.2 docs/checks/convert_include_to_render.md
theme-check-1.9.1 docs/checks/convert_include_to_render.md
theme-check-1.9.0 docs/checks/convert_include_to_render.md
theme-check-1.8.0 docs/checks/convert_include_to_render.md
theme-check-1.7.2 docs/checks/convert_include_to_render.md
theme-check-1.7.1 docs/checks/convert_include_to_render.md
theme-check-1.7.0 docs/checks/convert_include_to_render.md
theme-check-1.6.2 docs/checks/convert_include_to_render.md