You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If you want to get a file included inline, add the attribute `inline`: e.g. `Filename.css[inline]`
12
12
- You can add multiple resources per line. E. g. `Slider.js,Main.css,Footer.css[async class="footer-styles"],Header[inline class="header-styles"],//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js[async]`
@@ -23,24 +23,23 @@ In [`Carbon.IncludeAssets`](Configuration/Settings.yaml#L19) following settings
|`LoadJSforCSSAsynchron`| (boolean) If true the javascript for asynchronous CSS get inlined (If needed). Defaults to `true`|
26
-
|`GoogleFonts`| (string) If set, these fonts will included from Google. E.g. `Lato\|Open+Sans:400,700` Defaults to `null`|
27
26
|`ResourceHints`| (array) The setting, which global [resource hints] should be added. |
28
27
|`Default`| (array) The default setting for a `Packages` entry. If a key is not set within a `Packages` entry, this value will be used |
29
28
30
29
### Structure of Packages entry
31
30
32
31
In `Carbon.IncludeAssets.Packages` you can define your packages, which should output assets. The keys get sorted first by numbers, then by characters. Like that, it is possible to define a load order for you packages. A single entry can have following entries (The Defaults are stored in [`Carbon.IncludeAssets.Default`](Configuration/Settings.yaml#L30)):
|`Package`| (string) The package key. If it set to `SitePackage`, it will be replaced automatically with the package key from the site package. Defaults to `SitePackage`|
37
-
|`CacheBuster`| (boolean) Append a hash value from the content of the file. Defaults to `true`|
38
-
|`ConditionPrototype`| (string) If set, the files get only included if the fusion prototype returns a truthy value. Defaults to `null`|
39
-
|`Wrapper`| (string) If set, the generated tags will be wrapped. `{content}` will be replaced with the tags. Example: `'<!--[if lt IE 9]>{content}<![endif]-->'`|
|`Package`| (string) The package key. If it set to `SitePackage`, it will be replaced automatically with the package key from the site package. Defaults to `SitePackage`|
36
+
|`CacheBuster`| (boolean) Append a hash value from the content of the file. Defaults to `true`|
37
+
|`ConditionPrototype`| (string) If set, the files get only included if the fusion prototype returns a truthy value. Defaults to `null`|
38
+
|`Wrapper`| (string) If set, the generated tags will be wrapped. `{content}` will be replaced with the tags. Example: `'<!--[if lt IE 9]>{content}<![endif]-->'`|
40
39
|`Path`| (array) Define the files get loaded from. There are different paths for inline and linked files. Every type (`css`,`js`, `mjs`, `html`, `preloadasset`, `preloadcss`, `preloadscript` or `modulepreload`) can have a different path inside the Resources folder |
41
-
|`General`| (array) Asset files who get loaded in live and backend view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
42
-
|`Backend`| (array) Asset files that get loaded only in the backend view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
43
-
|`Live`| (array) Asset files that get loaded only in the live view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
40
+
|`General`| (array) Asset files who get loaded in live and backend view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
41
+
|`Backend`| (array) Asset files that get loaded only in the backend view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
42
+
|`Live`| (array) Asset files that get loaded only in the live view. Contains four entries: `Head`, `Body`, `HeadStart` and `BodyStart`|
@@ -190,10 +188,6 @@ The heart of this package. This prototype generates a `script`, `style`, and `li
190
188
| `assetPath` | (string) The path to the file inside the Resources folder. Per default, it is set dynamically |
191
189
| `wrapper` | (string) If set, the tag will be wrapped. `{content}` will be replaced with the tag. Example: `'<!--[if lt IE 9]>{content}<![endif]-->'`|
192
190
193
-
### [Carbon.IncludeAssets:GoogleFonts]
194
-
195
-
You can set the property `fonts` e.g. `Lato|Open+Sans:400,700` and the `style` tag get generated. Per default, this prototype read the [`Settings.yaml`](Configuration/Settings.yaml#L21).
196
-
197
191
### [Carbon.IncludeAssets:ResourceHints]
198
192
199
193
This prototype renders the [resource hints] for the browser. Per default, this prototype read the [`Settings.yaml`](Configuration/Settings.yaml#L22-L28). But you can also pass `preloadNodes` or `prerenderNodes` (Array, FlowQuery, or a single node) for further optimization.
@@ -203,10 +197,9 @@ This prototype renders the [resource hints] for the browser. Per default, this p
203
197
If you have [Sandstorm.CookiePunch] installed, please add the following attribute to your script entry:
204
198
205
199
```yaml
206
-
- YourJSFile.js[data-never-block]
200
+
- YourJSFile.js[data-never-block]
207
201
```
208
202
209
-
210
203
## Installation
211
204
212
205
Most of the time, you have to make small adjustments to a package (e.g., the configuration in [`Settings.yaml`]). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site package located under `Packages/Sites/`. To install it correctly go to your theme package (e.g.`Packages/Sites/Foo.Bar`) and run following command:
@@ -231,7 +224,6 @@ The `--no-update` command prevent the automatic update of the dependencies. Afte
0 commit comments