Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Sep 26, 2024
1 parent fc3811a commit 689891c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/docs/languages/haml.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ export default function (eleventyConfig) {
| Feature | Syntax |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| 🚫 Filters | **Not yet supported** `:filterName some text` Read more about [Filters](/docs/filters/). |
| 🚫 [Eleventy Universal Filters](/docs/filters/#universal-filters) | **Not yet supported** `:filterName some text` Read more about [Filters](/docs/filters/). |
| 🚫 [Universal Filters](/docs/filters/#universal-filters) | **Not yet supported** `:filterName some text` Read more about [Filters](/docs/filters/). |
17 changes: 16 additions & 1 deletion src/docs/languages/liquid.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function (eleventyConfig) {
| ✅ 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. |
| ✅ Custom Filters | `{% raw %}{{ name \| upper }}{% endraw %}` Read more about [Filters](/docs/filters/) |
|[Eleventy Universal Filters](/docs/filters/#universal-filters) | `{% raw %}{% name \| filterName %}{% endraw %}` Read more about [Filters](/docs/filters/) |
|[Universal Filters](/docs/filters/#universal-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/). |
|[Shortcodes](/docs/shortcodes/) {% addedin "0.5.0" %} | `{% raw %}{% uppercase name %}{% endraw %}` Read more about [Shortcodes](/docs/shortcodes/). |

Expand Down Expand Up @@ -287,6 +287,21 @@ Zach likes to take long walks on Nebraska beaches. {% enduser2 %}

{% endraw %}

### Shortcode Parameter Parsing

Eleventy’s includes its own parameter parsing implementation for shortcodes. To swap to a more robust, Liquid-native solution, use the `setLiquidParameterParsing` Configuration API method. This will likely be enabled by default in a future major version of Eleventy. Related [GitHub #2679](https://github.com/11ty/eleventy/issues/2679).

{% set codeContent %}
export default function (eleventyConfig) {
// Current default:
// eleventyConfig.setLiquidParameterParsing("legacy");

// Liquid-native
eleventyConfig.setLiquidParameterParsing("builtin");
};
{% endset %}
{% include "snippets/configDefinition.njk" %}

### Access to `page` data values {% addedin "0.11.0" %}

If you aren’t using an arrow function, Liquid Shortcodes (and Nunjucks, Handlebars, and 11ty.js JavaScript Functions) will have access to Eleventy [`page` data values](/docs/data-eleventy-supplied/#page-variable-contents) without needing to pass them in as arguments.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/languages/nunjucks.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function (eleventyConfig) {
| ✅ Imports | `{% raw %}{% import 'macros.njk' %}{% endraw %}` looks in `_includes/macros.njk`. Does not process front matter in the include file. |
| ✅ Imports (Relative Path) {% addedin "0.9.0" %} | Relative paths use `./` (template’s directory) or `../` (template’s parent directory):<br>`{% raw %}{% import './macros.njk' %}{% endraw %}` looks for `macros.njk` in the template’s current directory. Does not process front matter in the include file. |
| ✅ Filters | `{% raw %}{% name \| filterName %}{% endraw %}` Read more about [Filters](/docs/filters/). |
|[Eleventy Universal Filters](/docs/filters/#universal-filters) | `{% raw %}{% name \| filterName %}{% endraw %}` Read more about [Filters](/docs/filters/). |
|[Universal Filters](/docs/filters/#universal-filters) | `{% raw %}{% name \| filterName %}{% endraw %}` Read more about [Filters](/docs/filters/). |
|[Custom Tags](/docs/custom-tags/) | `{% raw %}{% uppercase name %}{% endraw %}` Read more about [Custom Tags](/docs/custom-tags/). {% addedin "0.5.0" %} |
|[Shortcodes](/docs/shortcodes/) | `{% raw %}{% uppercase name %}{% endraw %}` Read more about [Shortcodes](/docs/shortcodes/). {% addedin "0.5.0" %} |

Expand Down

0 comments on commit 689891c

Please sign in to comment.