mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
Document some of the undocumented features
This commit is contained in:
@@ -68,3 +68,17 @@ You can read more about each type of tag in their respective sections.
|
|||||||
```text
|
```text
|
||||||
{{ "/my/fancy/url" | append: ".html" }}
|
{{ "/my/fancy/url" | append: ".html" }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Multiple filters can be used on one output. They are applied from left to right.
|
||||||
|
|
||||||
|
<p class="code-label">Input</p>
|
||||||
|
```liquid
|
||||||
|
{% raw %}
|
||||||
|
{{ "adam!" | capitalize | prepend: "Hello " }}
|
||||||
|
{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
<p class="code-label">Output</p>
|
||||||
|
```text
|
||||||
|
Hello Adam!
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
title: Comments
|
||||||
|
description: An overview of comments tags in the Liquid template language.
|
||||||
|
---
|
||||||
|
|
||||||
|
Allows you to leave un-rendered code inside a Liquid template. Any text within
|
||||||
|
the opening and closing `comment` blocks will not be output, and any Liquid code
|
||||||
|
within will not be executed.
|
||||||
|
|
||||||
|
<p class="code-label">Input</p>
|
||||||
|
```liquid
|
||||||
|
{% raw %}
|
||||||
|
Any contents that you put between {% comment %} and {% endcomment %} tags
|
||||||
|
is turned into a comment.
|
||||||
|
{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
<p class="code-label">Output</p>
|
||||||
|
```liquid
|
||||||
|
Any contents that you put between {% comment %} and {% endcomment %} tags
|
||||||
|
is turned into a comment.
|
||||||
|
```
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
title: Raw
|
||||||
|
description: An overview of raw tags in the Liquid template language.
|
||||||
|
---
|
||||||
|
|
||||||
|
Raw temporarily disables tag processing. This is useful for generating content
|
||||||
|
(eg, Mustache, Handlebars) which uses conflicting syntax.
|
||||||
|
|
||||||
|
<p class="code-label">Input</p>
|
||||||
|
```text
|
||||||
|
{% raw %}
|
||||||
|
{% raw %}
|
||||||
|
In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
|
||||||
|
{% endraw % }
|
||||||
|
{% endraw %}
|
||||||
|
```
|
||||||
|
|
||||||
|
<p class="code-label">Output</p>
|
||||||
|
```liquid
|
||||||
|
Any contents that you put between {% comment %} and {% endcomment %} tags
|
||||||
|
is turned into a comment.
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user