• Stars
    star
    189
  • Rank 204,649 (Top 5 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google lighthouse stats of your website that you can put in 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.

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

https://pagespeed-insights.herokuapp.com?url=your_website_url

For example

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.

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

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

https://pagespeed-insights.herokuapp.com?url=your_website_url&categories=performance

All but PWA

https://pagespeed-insights.herokuapp.com?url=your_website_url&categories=performance,accessibility,best-practices,seo

Ordering

Order of categories is preserved

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
<p align="center">	<!-- (optional) center align -->
    <img src="/path/to/svg" width="XXXpx">
</p>

Keep results updated with action workflow

Example

More Repositories

1

Compiler-Lab-Codes

CSN-362 Compiler Lab Submissions
C
5
star
2

BicastR

Split and view large media (image or video) on multiple displays
JavaScript
4
star
3

Keys

Encryption keys Encrypted with Master Key
1
star
4

Config

Several configuration settings for different environments and IDEs
Shell
1
star
5

node-file-transfer

Transfer file to any device, wired or wirelessly
JavaScript
1
star
6

SDL2

Simple Direct-Media Layer graphics library
C
1
star
7

My-First-App

Learning android app development
Java
1
star
8

Sparky

TheCherno Sparky engine follow up
C++
1
star
9

Time-Table

Time-table generator
HTML
1
star
10

Fractal-Generator

Generate fractal pattern from IFS rules
HTML
1
star
11

probability-function-generator

High precision function generator to achieve desired probability
C++
1
star
12

Alpino

A 3-D web media player made for Microsoft Code.Fun.Do
JavaScript
1
star
13

windows-app-locker

A very simple windows application hijacking
C++
1
star
14

fork-logic

generate a c/c++ code snippet for desired no. of processes to create using fork() system call
C
1
star
15

Memory-Errors

Bad memory management examples and their testing using various tools
C++
1
star
16

CanteenApp-WebServer

Web server used for canteen app (android)
HTML
1
star
17

NFSMW2-SaveGame

Need for Speed Most Wanted 2012 save game files
1
star
18

pulseNet

pulseNet library for machine learning
Python
1
star
19

server-response

Testing server response
JavaScript
1
star
20

CanteenApp

Canteen Application made for CSN-521 (Mobile and Pervasive computing) course
Java
1
star
21

Excel-DLL

Simple (Dynamic Link Library) for Microsoft Excel
C++
1
star
22

Bash-Scripts

Bash scripts for automation tasks
Shell
1
star
23

test

testing...
JavaScript
1
star
24

Epileptic-Seizure-Classification

Epileptic Seizure Classification of Kaggle Dataset
Jupyter Notebook
1
star