diff --git a/README.md b/README.md index 01f4fef..ad0824b 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,24 @@ This generates: ``` +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 +

Title

+

This is a paragraph.

+

This is another paragraph.

+``` + You can create custom tags (intended for Web Components) using the `deftag` macro. ```lisp @@ -124,6 +142,14 @@ Which generates: ``` +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.