Skip to content

Commit de48ff3

Browse files
doc: Added documentation about inner locals
1 parent c5fe218 commit de48ff3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ posthtml([ include({ encoding: 'utf8' }) ])
8585
</body>
8686
</html>
8787
```
88+
89+
You can also pass your locals directly on the \<include> content, just drop a JSON there. When doing it, all the "\n" chars will be removed from your data.
90+
If you need "\n" chars on your data, you can still use the "locals" attribute.
91+
92+
```html
93+
<include src="components/button.html">
94+
{
95+
"text": "Button"
96+
}
97+
</include>
98+
```
99+
88100
> **Note:** Also supports multi nesting.
89101
90102
<h2 align="center">LICENSE</h2>

0 commit comments

Comments
 (0)