Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/docs/languages/liquid.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export default function (eleventyConfig) {

| Feature | Syntax |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ✅ Include | `{% raw %}{% include user %}{% endraw %}` looks for `_includes/user.liquid`. Does not process front matter in the include file. |
| ✅ Includes (Relative Path) {% addedin "0.9.0" %} | Relative paths use `./` (template’s directory) or `../` (template’s parent directory): `{% raw %}{% include ./included %}{% endraw %}` looks for `included.liquid` in the template’s current directory. Does not process front matter.<br><br>{% callout "warn" %}If `_includes/included.liquid` also exists, Liquid will use this file instead.{% endcallout %} |
| ✅ Include (Quoted) | {% callout "info" %}Starting in Eleventy 1.0, Liquid includes without quotation marks require `dynamicPartials: false`—Read more at [Quoted Include Paths](#quoted-include-paths).{% endcallout %}`{% raw %}{% include 'user' %}{% endraw %}` looks for `_includes/user.liquid`. Does not process front matter in the include file. |
| ✅ Include (Relative Path, Quoted) {% addedin "0.9.0" %} | {% callout "info" %}Starting in Eleventy 1.0, Liquid includes without quotation marks require `dynamicPartials: false`—Read more at [Quoted Include Paths](#quoted-include-paths).{% endcallout %}Relative paths use `./` (template’s directory) or `../` (template’s parent directory): `{% raw %}{% include './dir/user' %}{% endraw %}` looks for `./dir/user.liquid` from the template’s current directory. Does not process front matter in the include file.<br><br>{% callout "warn" %}If `_includes/dir/user.liquid` also exists, Liquid will use this file instead.{% endcallout %} |
| ✅ Include (pass in Data) | `{% raw %}{% include 'user' with 'Ava' %}{% endraw %}`. Does not process front matter in the include file. |
| ✅ Include (pass in Data) | `{% raw %}{% include 'user', user1: 'Ava', user2: 'Bill' %}{% endraw %}`. Does not process front matter in the include file. |
| ✅ Render | `{% raw %}{% render user %}{% endraw %}` looks for `_includes/user.liquid`. Does not process front matter in the include file. |
| ✅ Render (Relative Path) {% addedin "0.9.0" %} | Relative paths use `./` (template’s directory) or `../` (template’s parent directory): `{% raw %}{% render ./included %}{% endraw %}` looks for `included.liquid` in the template’s current directory. Does not process front matter.<br><br>{% callout "warn" %}If `_includes/included.liquid` also exists, Liquid will use this file instead.{% endcallout %} |
| ✅ Render (Quoted) | {% callout "info" %}Starting in Eleventy 1.0, Liquid includes without quotation marks require `dynamicPartials: false`—Read more at [Quoted Include Paths](#quoted-include-paths).{% endcallout %}`{% raw %}{% render 'user' %}{% endraw %}` looks for `_includes/user.liquid`. Does not process front matter in the include file. |
| ✅ Render (Relative Path, Quoted) {% addedin "0.9.0" %} | {% callout "info" %}Starting in Eleventy 1.0, Liquid includes without quotation marks require `dynamicPartials: false`—Read more at [Quoted Include Paths](#quoted-include-paths).{% endcallout %}Relative paths use `./` (template’s directory) or `../` (template’s parent directory): `{% raw %}{% render './dir/user' %}{% endraw %}` looks for `./dir/user.liquid` from the template’s current directory. Does not process front matter in the include file.<br><br>{% callout "warn" %}If `_includes/dir/user.liquid` also exists, Liquid will use this file instead.{% endcallout %} |
| ✅ Render (pass in Data) | `{% raw %}{% render 'user' with 'Ava' %}{% endraw %}`. Does not process front matter in the include file. |
| ✅ Render (pass in Data) | `{% raw %}{% render 'user', user1: 'Ava', user2: 'Bill' %}{% endraw %}`. Does not process front matter in the include file. |
| ✅ Custom Filters | `{% raw %}{{ name \| upper }}{% endraw %}` Read more about [Filters](/docs/filters/) |
| ✅ [Universal Filters](/docs/filters/) | `{% raw %}{% name \| filterName %}{% endraw %}` Read more about [Filters](/docs/filters/) |
| ✅ [Custom Tags](/docs/custom-tags/) {% addedin "0.5.0" %} | `{% raw %}{% uppercase name %}{% endraw %}` Read more about [Custom Tags](/docs/custom-tags/). |
Expand All @@ -98,11 +98,11 @@ If you’d like to use include paths without quotation marks, you must enable `d

#### Default behavior, `dynamicPartials: true`

`{% raw %}{% include 'user' %}{% endraw %}` looks for `_includes/user.liquid`
`{% raw %}{% render 'user' %}{% endraw %}` looks for `_includes/user.liquid`

#### Non-quoted includes with `dynamicPartials: false`

`{% raw %}{% include user %}{% endraw %}` looks for `_includes/user.liquid`
`{% raw %}{% render user %}{% endraw %}` looks for `_includes/user.liquid`

## Filters

Expand Down Expand Up @@ -320,4 +320,3 @@ export default function (eleventyConfig) {
};
{% endset %}
{% include "snippets/configDefinition.njk" %}