Skip to content

Commit

Permalink
update usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Nov 17, 2023
1 parent 27531ee commit 02d7d28
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/site/markdown/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,10 @@ The following advanced script tag attributes are supported:
* `nonce` = {string}
* `referrerpolicy` = no-referrer | no-referrer-when-downgrade | origin | origin-when-cross-origin | same-origin | strict-origin | strict-origin-when-cross-origin | unsafe-url
* `type` = module | text/javascript
* `customAttributes` - set arbitrary HTML attributes, e.g. `customAttributes=['attr1=value 1','data-attr2=5','attr3']`

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes for a full documentation of this attributes.

It is possible to set a list of custom attributes:

```html
<sly data-sly-use.clientlib="/apps/wcm-io/wcm/ui/clientlibs/sightly/templates/clientlib.html"
data-sly-call="${clientlib.js @ categories=['my-clientlib-category'],
customAttributes=['attr1=value 1','data-attr2=5','attr3']}"/>
```


### Include CSS Files

Expand All @@ -51,14 +44,4 @@ Include CSS without special attributes:
The following advanced link tag attributes are supported:

* `rel` = prefetch | preload (if not given, `rel="stylesheet" type="text/css"` is set)


### Custom Attributes

It is possible to set a list of custom attributes:

```html
<sly data-sly-use.clientlib="/apps/wcm-io/wcm/ui/clientlibs/sightly/templates/clientlib.html"
data-sly-call="${clientlib.css @ categories=['my-clientlib-category'],
customAttributes=['attr1=value 1','data-attr2=5','attr3']}"/>
```
* `customAttributes` - set arbitrary HTML attributes, e.g. `customAttributes=['attr1=value 1','data-attr2=5','attr3']`

0 comments on commit 02d7d28

Please sign in to comment.