Skip to content

Commit 4cc6912

Browse files
authored
Add example showing multiple site paths support in README.md (#467)
* Update README.md * Add labs docs link
1 parent 55f6cce commit 4cc6912

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ A Netlify plugin to generate a lighthouse report for every deploy
44

55
## Usage
66

7-
You can install this plugin in the Netlify UI from this [direct in-app installation link](https://app.netlify.com/plugins/@netlify/plugin-lighthouse/install) or from the [Plugins directory](https://app.netlify.com/plugins).
7+
If you would like to run the Lighthouse build plugin for multiple site paths, such as for the site root path and a contact page, we recommend installing the build plugin manually in the `netlify.toml` file.
8+
9+
### Install plugin through the Netlify UI
10+
11+
You can install this plugin in the Netlify UI from this [direct in-app installation link](https://app.netlify.com/plugins/@netlify/plugin-lighthouse/install) or from the [Plugins directory](https://app.netlify.com/plugins).
12+
13+
### Install plugin through the `netlify.toml` file
814

915
You can also install it manually:
1016

@@ -60,6 +66,23 @@ You can customize the behavior via the `audits` input:
6066
performance = 0.8
6167
```
6268

69+
Example `netlify.toml` file that audits the site root path and a contact page:
70+
71+
```
72+
[[plugins]]
73+
package = "@netlify/plugin-lighthouse"
74+
75+
# Generate a Lighthouse report for the site's root path
76+
[[plugins.inputs.audits]]
77+
path = ""
78+
79+
# Generate a Lighthouse report for the contact site path
80+
[[plugins.inputs.audits]]
81+
path = "contact"
82+
83+
```
84+
85+
6386
The lighthouse report results are automatically printed to the **Deploy log** in the Netlify UI. For example:
6487
```
6588
2:35:07 PM: ────────────────────────────────────────────────────────────────
@@ -106,4 +129,6 @@ Some items of note:
106129
- The [Lighthouse Build Plugin](https://app.netlify.com/plugins/@netlify/plugin-lighthouse/install) must be installed on your site(s) in order for these score visualizations to be displayed.
107130
- This Labs feature is currently only enabled at the user-level, so it will need to be enabled for each individual team member that wishes to see the Lighthouse scores displayed.
108131

132+
Learn more in our official [Labs docs](https://docs.netlify.com/netlify-labs/experimental-features/lighthouse-visualization/).
133+
109134
We have a lot planned for this feature and will be adding functionality regularly, but we'd also love to hear your thoughts. Please [share your feedback](https://netlify.qualtrics.com/jfe/form/SV_1NTbTSpvEi0UzWe) about this experimental feature and tell us what you think.

0 commit comments

Comments
 (0)