Update README
This commit is contained in:
parent
6a6e3231e7
commit
6471ee88d6
1 changed files with 26 additions and 0 deletions
26
README.md
26
README.md
|
@ -67,6 +67,24 @@ This generates:
|
|||
</div>
|
||||
```
|
||||
|
||||
The fragment `<>` allows you to group multiple elements without introducing additional wrappers.
|
||||
|
||||
```lisp
|
||||
(hsx
|
||||
(<>
|
||||
(h1 "Title")
|
||||
(p "This is a paragraph.")
|
||||
(p "This is another paragraph.")))
|
||||
```
|
||||
|
||||
This generates:
|
||||
|
||||
```html
|
||||
<h1>Title</h1>
|
||||
<p>This is a paragraph.</p>
|
||||
<p>This is another paragraph.</p>
|
||||
```
|
||||
|
||||
You can create custom tags (intended for Web Components) using the `deftag` macro.
|
||||
|
||||
```lisp
|
||||
|
@ -124,6 +142,14 @@ Which generates:
|
|||
</div>
|
||||
```
|
||||
|
||||
To output HSX as an HTML string, use the `render` method. By default, pretty-printing is enabled, but you can disable it by enabling the `minify` option.
|
||||
|
||||
```lisp
|
||||
(render (hsx ...))
|
||||
; or
|
||||
(render (hsx ...) :minify t)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the terms of the MIT license.
|
||||
|
|
Loading…
Reference in a new issue