A Netlify build plugin that injects build and deploy information into the DOM for debugging.
The plugin accesses Netlify's postprocessing snippet injection using the Netlify API, so we need to provide an access token.
- Sign in to Netlify and navigate to User Settings → Applications
- Generate a new personal access token
- Store that personal access token as a build environment variable called
BUILD_SITREP_TOKEN
in the site(s) you want to use the plugin with.
npm install --save @quarva/netlify-plugin-sitrep
or
yarn add @quarva/netlify-plugin-sitrep
[[plugins]]
package = "@quarva/netlify-plugin-sitrep"
Note: The [[plugins]]
line is required for each plugin, even if you have other plugins in your netlify.toml
file already.
By default, the plugin won't inject any data in a production context. You can adjust that with the allow_prod
input.
[[plugins]]
package = "@quarva/netlify-plugin-sitrep"
[plugins.inputs]
"allow_prod" = ""
# If true, the plugin will inject data even when run in a production context.
"verbose" = ""
# If true, the plugin will write each step to the deploy log.
These variables need to be set locally. You can do this by temporarily assigning them with netlify env
or by using dotenv
.
Variable Name | Description |
---|---|
BUILD_SITREP_TOKEN | Must be configured by the user |
SITE_ID | Must be configured by the user |
DEPLOY_ID | provided by Netlify, but can be configured by the user |
BUILD_ID | provided by Netlify, but can be configured by the user |
Sitrep for Netlify is a foundry project from Quarva.