{"id":13423197,"url":"https://github.com/ankurparihar/readme-pagespeed-insights","last_synced_at":"2025-03-15T13:30:48.107Z","repository":{"id":41396408,"uuid":"286255721","full_name":"ankurparihar/readme-pagespeed-insights","owner":"ankurparihar","description":"Google lighthouse stats of your website that you can put in readme","archived":false,"fork":false,"pushed_at":"2022-04-03T07:04:37.000Z","size":187,"stargazers_count":192,"open_issues_count":11,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-28T00:06:01.569Z","etag":null,"topics":["lighthouse-audits","pagespeed-insights","readme","svg"],"latest_commit_sha":null,"homepage":"https://pagespeed-insights.herokuapp.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ankurparihar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-09T14:42:20.000Z","updated_at":"2024-10-25T02:03:16.000Z","dependencies_parsed_at":"2022-08-27T21:43:09.795Z","dependency_job_id":null,"html_url":"https://github.com/ankurparihar/readme-pagespeed-insights","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankurparihar%2Freadme-pagespeed-insights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankurparihar%2Freadme-pagespeed-insights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankurparihar%2Freadme-pagespeed-insights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankurparihar%2Freadme-pagespeed-insights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankurparihar","download_url":"https://codeload.github.com/ankurparihar/readme-pagespeed-insights/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243735784,"owners_count":20339528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lighthouse-audits","pagespeed-insights","readme","svg"],"created_at":"2024-07-30T23:01:09.546Z","updated_at":"2025-03-15T13:30:47.842Z","avatar_url":"https://github.com/ankurparihar.png","language":"TypeScript","funding_links":[],"categories":["Tools","Statistical Tools (Widgets)","🛠️ Widgets 👇"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./assets/banner.svg\" width=\"800px\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align='center'\u003ePageSpeed Insights for README\u003c/h1\u003e\n\n\n\u003e Embed your website's pagespeed score to your readme\n\n\n### About PageSpeed Insights\nPageSpeed 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/).\n\n\n## Info\n\n### Guages\n\u003cp align=\"center\"\u003e\n\t\u003cimg width=\"800px\" src=\"./assets/guages.svg\"\u003e\n\u003c/p\u003e\n\n### PWA\n\u003cp align=\"center\"\u003e\n\t\u003cimg width=\"800px\" src=\"./assets/pwa.svg\"\u003e\n\u003c/p\u003e\n\n## API and Usage\n\n__Important note: Do not embed url to readme, instead embed generated svg__\n- 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.\n- Typically it takes 10-15 seconds to obtain the results from pagespeed api\n- Some servers don't allow (eg. google.com) or delay (eg. cloudflare) pagespeed crawler, so it may result in unexpected results.\n- The result may fluctuate slightly sometimes.\n\n### API url\nThe api is called from `https://pagespeed-insights.herokuapp.com`\n\n### Simple usage\nIn simple form it will return result for all categories for desktop version of your website. Replace `your_website_url` with your website's url\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\n```\nFor example\n```md\nhttps://pagespeed-insights.herokuapp.com?url=https://ankurparihar.github.io\n```\n\n### Theme\nDefault 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`.\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026theme=dark\n```\n\n### Strategy\nStrategy 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\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026strategy=mobile\n```\n\n### Category\nThere are 5 categories (in order)\n| Category Name | param |\n|-------------|---------------|\n| Performance | `performance` |\n| Accessibility | `accessibility` |\n| Best Practices | `best-practices` |\n| SEO | `seo` |\n| Progressive Web App | `pwa` |\n\nIf 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.\n\nExamples:\n\n#### Only performance\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026categories=performance\n```\n\n#### All but PWA\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026categories=performance,accessibility,best-practices,seo\n```\n\n#### Ordering\n\nOrder of categories is preserved\n\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026categories=seo,performance,accessibility\n```\n\n### Options\nAdditional options you can specify in query parameter\n| Name (default) | Description |\n|------|-------------|\n| `perfTestCount (1)` | Specify how many times __performance__ test to run |\n\n\u003c!-- \n### Accuracy\n\nPerformance is volatile so you can request up to 3 performance tests to retrieve more precise results\n```md\nhttps://pagespeed-insights.herokuapp.com?url=your_website_url\u0026tests=30\n``` --\u003e\n\n### Embedding into readme\nAfter downloading svg you can embed into readme as following\n- markdown method\n```\n![alt text](path/to/svg \"tooltip text\")\n```\n- html method\n```html\n\u003cp align=\"center\"\u003e\t\u003c!-- (optional) center align --\u003e\n    \u003cimg src=\"/path/to/svg\" width=\"XXXpx\"\u003e\n\u003c/p\u003e\n```\n\n### Keep results updated with action workflow\n- [pagespeed.yml](.github/workflows/pagespeed.yml)\n\n### Example\n- [ankurparihar.github.io](https://github.com/ankurparihar/ankurparihar.github.io#readme)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankurparihar%2Freadme-pagespeed-insights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankurparihar%2Freadme-pagespeed-insights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankurparihar%2Freadme-pagespeed-insights/lists"}