Skip to content

Commit 9091108

Browse files
committed
Updating documentation
1 parent 4bd9179 commit 9091108

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
# netlify-plugin-sitrep
2-
A Netlify build plugin to display debug information in dev or staging environments
2+
[![npm version](https://badge.fury.io/js/%40quarva%2Fnetlify-plugin-sitrep.svg)](https://badge.fury.io/js/%40quarva%2Fnetlify-plugin-sitrep)
33

4-
# Install
4+
A Netlify build plugin that injects build and deploy information into the DOM for debugging.
55

6-
Please install this plugin from the Netlify app.
6+
![Demo](https://github.com/Quarva/quarva.github.io/blob/master/img/netlify-build-sitrep/demo.gif?raw=true)
77

8-
Create an application token and store it as an environment variable called `BUILD_SITREP_TOKEN`
8+
## Usage
99

10-
# Configuration
10+
### Set up your Netlify environment variables
1111

12-
The following `inputs` options are available.
12+
The plugin accesses Netlify's postprocessing snippet injection using the Netlify API, so we need to provide an access token.
1313

14-
name: `allow_prod`
15-
description: If true, debug data will be injected in the production context.
14+
1. Sign in to Netlify and navigate to User Settings -> [Applications](https://app.netlify.com/user/applications)
15+
2. Generate a new personal access token
16+
3. Store that personal access token as an environment variable called `BUILD_SITREP_TOKEN` in the site(s) you want to use the plugin with.
1617

18+
### Install
19+
20+
```
21+
npm install --save "@quarva/netlify-plugin-sitrep"
22+
```
23+
24+
### Add the plugin to `netlify.toml`
25+
26+
```toml
27+
[[plugins]]
28+
package = "@quarva/netlify-plugin-sitrep"
29+
```
30+
31+
Note: The `[[plugins]]` line is required for each plugin, even if you have other
32+
plugins in your `netlify.toml` file already.
33+
34+
### Configuration
35+
36+
By default, the plugin won't inject any data in a production context. You can adjust that with the `allow_prod` input.
37+
38+
```toml
1739
[[plugins]]
18-
package = "."
40+
package = "@quarva/netlify-plugin-sitrep"
1941
[plugins.inputs]
20-
"allow_prod" = "true"
42+
"allow_prod" = "false"
43+
# If true, the plugin will work in production.
44+
```

0 commit comments

Comments
 (0)