Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language and examples to describe how to use the configuration op… #8249

Merged
merged 1 commit into from Jun 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/_docs/configuration/liquid.md
Expand Up @@ -9,10 +9,28 @@ options are
- `warn` --- Output a warning on the console for each error.
- `strict` --- Output an error message and stop the build.

Within _config.yml, this could be configured as follows:

```yaml
liquid:
error_mode: warn
```

You can also configure Liquid's renderer to catch non-assigned variables and
non-existing filters by setting `strict_variables` and / or `strict_filters`
to `true` respectively. {% include docs_version_badge.html version="3.8.0" %}

Do note that while `error_mode` configures Liquid's parser, the `strict_variables`
and `strict_filters` options configure Liquid's renderer and are consequently,
mutually exclusive.

An example of setting these variables within _config.yml is as follows:

```yaml
liquid:
error_mode strict
strict_variables: true
strict_filters: true
```

Configuring as described above will stop a build/serve from happening and instead call out the offending error and halt. This is helpful when desiring to catch liquid-related issues by stopping the build or serve process and forcing you to deal with it.