Skip to content

Commit 2f4bb30

Browse files
committed
feat: improve page id docs
1 parent f8b5ac3 commit 2f4bb30

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

packages/foo-api-docs/docs/lighthouse-check-github-action/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Simple example payload. This could be handy if you have commas in your URLs and
145145
'["https://www.foo.software", "https://www.google.com"]'
146146
```
147147

148-
A more complex example below is if you're running Lighthouse via foo.software by passing [`fooApiToken`](#fooapitoken) and you want to associate pages you've added on Foo with temporary URLs using an ephemeral provided by a service like [Vercel](https://vercel.com). The parsed `urlsJson` value can be an array of strings or an array of string tuples. The first value of the tuple should be the Foo page API token and the second value will be the alternative URL. See the [Vercel example](http://localhost:3000/docs/lighthouse-check-github-action/examples#vercel-with-foo).
148+
A more complex example below is if you're running Lighthouse via foo.software by passing [`fooApiToken`](#fooapitoken) and you want to associate pages you've added on Foo with temporary URLs using an ephemeral provided by a service like [Vercel](https://vercel.com). The parsed `urlsJson` value can be an array of strings or an array of string tuples. The first value of the tuple should be the Foo page API token and the second value will be the alternative URL. See the [Vercel example](/docs/lighthouse-check-github-action/examples#vercel-with-foo).
149149

150150
```javascript
151151
'[["fooPageToken1", "https://some-temp-url.com/1234"], ["fooPageToken2", "https://some-temp-url.com/567"]]'

packages/foo-api-docs/docs/lighthouse-check-github-action/examples.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ jobs:
140140
# ... all your other inputs
141141
```
142142

143+
#### Trigger Audits on Only Certain Pages in an Account with Different URLs
144+
145+
If you want to trigger audits on pages you've added on Foo, but using different URLs. For example, if you use Vercel, Netlify, or CloudFlare to deploy an ephemeral URL in a PR and you want to track it on Foo under one "page" you can do so with the [`urlsJson` input](/docs/lighthouse-check-github-action/configuration#urlsjson).
146+
147+
For an example on how to do this see the [Vercel example](#vercel-with-foo).
148+
149+
> **Pro Tip**: In order to do the above, you'll need to have 2 Foo tokens. Firstly, you'll need the [API token found in your account](https://www.foo.software/account/api). Secondly, you'll need the ["page token" found in the page dashboard](https://www.foo.software/dashboard/pages) for the corresponding page.
150+
143151
## Overriding Config and Option Defaults
144152

145153
**Note**: this approach is not supported when [running on Foo](#running-on-foo-and-saving-results).
@@ -193,6 +201,8 @@ jobs:
193201

194202
If you're utilizing [Foo to save results](/docs/lighthouse-check-github-action/examples#running-on-foo-and-saving-results), you can associate a URL via the [`urlsJson` input](/docs/lighthouse-check-github-action/configuration#urlsjson) similar to the below. Note the use of the tuple, the first value being the Foo page API token and the second being the ephemeral URL.
195203

204+
> **Pro Tip**: In order to do the above, you'll need to have 2 Foo tokens. Firstly, you'll need the [API token found in your account](https://www.foo.software/account/api). Secondly, you'll need the ["page token" found in the page dashboard](https://www.foo.software/dashboard/pages) for the corresponding page.
205+
196206
```yaml
197207
name: Lighthouse
198208
on: [pull_request]

0 commit comments

Comments
 (0)