Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankurparihar/readme-pagespeed-insights
Google lighthouse stats of your website that you can put in readme
https://github.com/ankurparihar/readme-pagespeed-insights
lighthouse-audits pagespeed-insights readme svg
Last synced: about 2 months ago
JSON representation
Google lighthouse stats of your website that you can put in readme
- Host: GitHub
- URL: https://github.com/ankurparihar/readme-pagespeed-insights
- Owner: ankurparihar
- License: apache-2.0
- Created: 2020-08-09T14:42:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-03T07:04:37.000Z (over 2 years ago)
- Last Synced: 2024-07-31T23:46:43.529Z (4 months ago)
- Topics: lighthouse-audits, pagespeed-insights, readme, svg
- Language: TypeScript
- Homepage: https://pagespeed-insights.herokuapp.com
- Size: 183 KB
- Stars: 188
- Watchers: 5
- Forks: 30
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-profile - PageSpeed score - Generate website's PageSpeed score in animated svg form which can be used in GitHub README (Tools)
- fucking-awesome-github-profile-readme - PageSpeed score - Generate website's PageSpeed score in animated svg form which can be used in GitHub README (Tools)
- awesome-readme-tools - Readme Pagespeed Insights - Google lighthouse stats of your website that you can put in readme. (Statistical Tools (Widgets))
- awesome-github-profile-readme - PageSpeed score - Generate website's PageSpeed score in animated svg form which can be used in GitHub README (Tools)
- awesome-ubc-profile-readme - PageSpeed score - Generate website's PageSpeed score in animated svg form which can be used in GitHub README (Tools)
- awesome-github-profile - Readme Pagespeed Insights
README
PageSpeed Insights for README
> Embed your website's pagespeed score to your readme
### About PageSpeed Insights
PageSpeed Insights analyzes the content of a web page, then generates suggestions to make that page faster. [Learn more](https://developers.google.com/speed/docs/insights/about/).## Info
### Guages
### PWA
## API and Usage
__Important note: Do not embed url to readme, instead embed generated svg__
- It takes time to perform audits of website. So embedding it directly in readme would not render due to server timeout. Instead you must first visit and download the svg from the api (by simply visiting api url with desired parameters). And then embed that svg to your README files.
- Typically it takes 10-15 seconds to obtain the results from pagespeed api
- Some servers don't allow (eg. google.com) or delay (eg. cloudflare) pagespeed crawler, so it may result in unexpected results.
- The result may fluctuate slightly sometimes.### API url
The api is called from `https://pagespeed-insights.herokuapp.com`### Simple usage
In simple form it will return result for all categories for desktop version of your website. Replace `your_website_url` with your website's url
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url
```
For example
```md
https://pagespeed-insights.herokuapp.com?url=https://ankurparihar.github.io
```### Theme
Default result is theme-agnostic i.e. looks good in both light and dark environment. But you can force one of two additional themes that are `light` and `dark`.
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url&theme=dark
```### Strategy
Strategy specifies the type of device your website is audited for. You can specify `strategy` as either `mobile` or `desktop`. If none is specified `desktop` is chosen
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url&strategy=mobile
```### Category
There are 5 categories (in order)
| Category Name | param |
|-------------|---------------|
| Performance | `performance` |
| Accessibility | `accessibility` |
| Best Practices | `best-practices` |
| SEO | `seo` |
| Progressive Web App | `pwa` |If not specified, all the categories are evaluated. But you can specify only categories which you want to evaluate. The `category` parameter is comma-separated category indicators.
Examples:
#### Only performance
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url&categories=performance
```#### All but PWA
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url&categories=performance,accessibility,best-practices,seo
```#### Ordering
Order of categories is preserved
```md
https://pagespeed-insights.herokuapp.com?url=your_website_url&categories=seo,performance,accessibility
```### Options
Additional options you can specify in query parameter
| Name (default) | Description |
|------|-------------|
| `perfTestCount (1)` | Specify how many times __performance__ test to run |### Embedding into readme
After downloading svg you can embed into readme as following
- markdown method
```
![alt text](path/to/svg "tooltip text")
```
- html method
```html
```### Keep results updated with action workflow
- [pagespeed.yml](.github/workflows/pagespeed.yml)### Example
- [ankurparihar.github.io](https://github.com/ankurparihar/ankurparihar.github.io#readme)