diff --git a/basics/introduction.md b/basics/introduction.md index 6db1fec..79b1513 100644 --- a/basics/introduction.md +++ b/basics/introduction.md @@ -68,3 +68,17 @@ You can read more about each type of tag in their respective sections. ```text {{ "/my/fancy/url" | append: ".html" }} ``` + +Multiple filters can be used on one output. They are applied from left to right. + +
Input
+```liquid +{% raw %} +{{ "adam!" | capitalize | prepend: "Hello " }} +{% endraw %} +``` + +Output
+```text +Hello Adam! +``` diff --git a/tags/comment.md b/tags/comment.md new file mode 100644 index 0000000..d9d43fc --- /dev/null +++ b/tags/comment.md @@ -0,0 +1,22 @@ +--- +title: Comment +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. + +Input
+```liquid +{% raw %} +Anything you put between {% comment %} and {% endcomment %} tags +is turned into a comment. +{% endraw %} +``` + +Output
+```liquid +Anything you put between {% comment %} and {% endcomment %} tags +is turned into a comment. +``` diff --git a/tags/raw.md b/tags/raw.md new file mode 100644 index 0000000..49ba629 --- /dev/null +++ b/tags/raw.md @@ -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. + +Input
+
+{% raw %}
+{% raw %}
+ In Handlebars, {{ this }} will be HTML-escaped, but
+ {{{ that }}} will not.
+{% endraw %}
+{% endraw %}
+
+
+Output
+```text +{% raw %}In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.{% endraw %} +```