diff --git a/docs/source/_data/sidebar.yml b/docs/source/_data/sidebar.yml index 5560631ec..53e25330b 100644 --- a/docs/source/_data/sidebar.yml +++ b/docs/source/_data/sidebar.yml @@ -79,11 +79,13 @@ tags: comment: comment.html cycle: cycle.html decrement: decrement.html + echo: echo.html for: for.html if: if.html include: include.html increment: increment.html layout: layout.html + liquid: liquid.html raw: raw.html render: render.html tablerow: tablerow.html diff --git a/docs/source/tags/echo.md b/docs/source/tags/echo.md new file mode 100644 index 000000000..5de6dea02 --- /dev/null +++ b/docs/source/tags/echo.md @@ -0,0 +1,20 @@ +--- +title: Echo +--- + +{% since %}v9.31.0{% endsince %} + +Outputs an expression in the rendered HTML. This is identical to wrapping an expression in `{{` and `}}`, but works inside liquid tags and supports filters. + +## echo + +Input +```liquid +{% assign username = 'Bob' %} +{% echo username | append: ", welcome to LiquidJS!" | capitalize %} +``` + +Output +```text +Bob, welcome to LiquidJS! +``` diff --git a/docs/source/tags/liquid.md b/docs/source/tags/liquid.md new file mode 100644 index 000000000..258528ac6 --- /dev/null +++ b/docs/source/tags/liquid.md @@ -0,0 +1,28 @@ +--- +title: Liquid +--- + +{% since %}v9.31.0{% endsince %} + +Encloses multiple tags within one set of delimiters, to allow writing Liquid logic more concisely. + +## liquid + +Input +```liquid +{% liquid + assign names = 'Bob, Sally' | split: ', ' + + for name in names + echo 'Hello, ' | append: name + unless forloop.last + echo ', ' + endunless + endfor +%} +``` + +Output +```text +Hello, Bob, Hello Sally +```