# `scripts` To insert custom scripts in the head or body of a page. ## Options | Option | Type | Description | | --- | --- | --- | | head | [[Script object](#script-object)] | Inserts scripts in the head tags of the page. | | body | [[Script object](#script-object)] | Inserts scripts before the close body tag of the page. | ### Script object | Option | Type | Description | | --- | --- | --- | | src | string | **REQUIRED.** URL or path to script. | | inline | boolean | Inlines the script content into the page. Improves performance for small scripts. Default value: `false`. | | async | boolean | Specifies to add the `async` attribute to the script tag. Default value: `false`. | | crossorigin | string | Adds the `crossorigin` attribute with corresponding value to the script tag. | | defer | boolean | Specifies to add the `defer` attribute to the script tag. Default value: `false`. | | fetchpriority | string | Adds the `fetchpriority` attribute with corresponding value to the script tag. Possible values: `high`, `low`, or `auto`. Default value: `auto`. | | integrity | string | Adds the `integrity` attribute with corresponding value to the script tag. | | module | boolean | Specifies to add the `module` attribute to the script tag. Default value: `false`. | | nomodule | boolean | Specifies to add the `nomodule` attribute to the script tag. Default value: `false`. | | nonce | string | Adds the `nonce` attribute with corresponding value to the script tag. | | referrerpolicy | string | Adds the `referrerpolicy` attribute with corresponding value to the script tag. Possible values: `no-referrer`, `no-referrer-when-downgrade`, `origin`, `origin-when-cross-origin`, `same-origin`, `strict-origin`, `strict-origin-when-cross-origin`, `unsafe-url`, `''`. Default value: `strict-origin-when-cross-origin` (with fallback to `''`). | | type | string | Adds the `type` attribute with corresponding value to the script tag. | ## Examples ### Add scripts to page header and body ```yaml scripts: head: - src: 'https://example.com/script.js' - src: ./scripts/script.js body: - src: 'https://analytics.google.com/ga.js' crossorigin: anonymous defer: true ``` This configuration produces the following script tags: ```html
...