We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61848f9 commit 058dc20Copy full SHA for 058dc20
tags/variable.md
@@ -55,6 +55,24 @@ Captures the string inside of the opening and closing tags and assigns it to a v
55
```text
56
I am being captured.
57
```
58
+Using `capture`, you can create complex strings using other variables created with `assign`.
59
+
60
+<p class="code-label">Input</p>
61
+```text
62
+{% assign favorite_food = 'pizza' %}
63
+{% assign age = 35 %}
64
65
+{% capture about_me %}
66
+I am {{ age }} and my favorite food is {{ favorite_food }}.
67
+{% endcapture %}
68
69
+{{ about_me }}
70
+```
71
72
+<p class="code-label">Output</p>
73
74
+I am 35 and my favourite food is pizza.
75
76
77
## increment
78
0 commit comments