Skip to content

Commit 1db4219

Browse files
author
Adam Hollett
authored
Merge pull request TheAlgorithms#879 from joshaidan/gh-pages-new-features
Fixes TheAlgorithms#852: Undocumented Things
2 parents 7ecc10b + 8b6f4d2 commit 1db4219

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

basics/introduction.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,17 @@ You can read more about each type of tag in their respective sections.
6868
```text
6969
{{ "/my/fancy/url" | append: ".html" }}
7070
```
71+
72+
Multiple filters can be used on one output. They are applied from left to right.
73+
74+
<p class="code-label">Input</p>
75+
```liquid
76+
{% raw %}
77+
{{ "adam!" | capitalize | prepend: "Hello " }}
78+
{% endraw %}
79+
```
80+
81+
<p class="code-label">Output</p>
82+
```text
83+
Hello Adam!
84+
```

tags/comment.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Comment
3+
description: An overview of comments tags in the Liquid template language.
4+
---
5+
6+
Allows you to leave un-rendered code inside a Liquid template. Any text within
7+
the opening and closing `comment` blocks will not be output, and any Liquid code
8+
within will not be executed.
9+
10+
<p class="code-label">Input</p>
11+
```liquid
12+
{% raw %}
13+
Anything you put between {% comment %} and {% endcomment %} tags
14+
is turned into a comment.
15+
{% endraw %}
16+
```
17+
18+
<p class="code-label">Output</p>
19+
```liquid
20+
Anything you put between {% comment %} and {% endcomment %} tags
21+
is turned into a comment.
22+
```

tags/raw.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Raw
3+
description: An overview of raw tags in the Liquid template language.
4+
---
5+
6+
Raw temporarily disables tag processing. This is useful for generating content
7+
(eg, Mustache, Handlebars) which uses conflicting syntax.
8+
9+
<p class="code-label">Input</p>
10+
<pre class="highlight">
11+
<code>{% raw %}
12+
&#123;&#37; raw &#37;&#125;
13+
In Handlebars, {{ this }} will be HTML-escaped, but
14+
{{{ that }}} will not.
15+
&#123;&#37; endraw &#37;&#125;
16+
{% endraw %}</code>
17+
</pre>
18+
19+
<p class="code-label">Output</p>
20+
```text
21+
{% raw %}In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.{% endraw %}
22+
```

0 commit comments

Comments
 (0)