{"id":16158828,"url":"https://github.com/pengzhanbo/caniuse-embed","last_synced_at":"2026-02-11T23:09:07.074Z","repository":{"id":236159065,"uuid":"791877555","full_name":"pengzhanbo/caniuse-embed","owner":"pengzhanbo","description":"Embed the CanIUse compatibility table in your site","archived":false,"fork":false,"pushed_at":"2026-01-17T09:22:24.000Z","size":1350,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T20:38:04.199Z","etag":null,"topics":["astro","browser-compat-data","caniuse","mdn","web-features"],"latest_commit_sha":null,"homepage":"https://caniuse-embed.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pengzhanbo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-25T14:43:29.000Z","updated_at":"2026-01-17T09:22:27.000Z","dependencies_parsed_at":"2025-12-11T22:10:34.657Z","dependency_job_id":null,"html_url":"https://github.com/pengzhanbo/caniuse-embed","commit_stats":null,"previous_names":["pengzhanbo/caniuse-embed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pengzhanbo/caniuse-embed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengzhanbo%2Fcaniuse-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengzhanbo%2Fcaniuse-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengzhanbo%2Fcaniuse-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengzhanbo%2Fcaniuse-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pengzhanbo","download_url":"https://codeload.github.com/pengzhanbo/caniuse-embed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengzhanbo%2Fcaniuse-embed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29349262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["astro","browser-compat-data","caniuse","mdn","web-features"],"created_at":"2024-10-10T01:55:10.879Z","updated_at":"2026-02-11T23:09:07.062Z","avatar_url":"https://github.com/pengzhanbo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# CanIUse Embed\n\nEmbed up-to-date data from [caniuse.com](https://caniuse.com/) and\n[mozilla's browser compat data](https://github.com/mdn/browser-compat-data).\n\nDisplays feature support data for multiple versions of the 10 major browsers.\n\nConfigurable, reliable, and fully responsive.\n\n## Document\n\nSee [Documentation](https://caniuse-embed.vercel.app/) for more details.\n\n## Usage\n\nInclude the following javascript file in your document.\n\n```html\n\u003cscript type=\"module\" src=\"https://caniuse-embed.vercel.app/embed.js\"\u003e\u003c/script\u003e\n```\n\nPaste this snippet where you want the embed `caniuse` to be displayed:\n\n```html\n\u003cp class=\"ciu-embed\" data-feature=\"{feature}\" data-past=\"2\" data-future=\"3\"\u003e\u003c/p\u003e\n```\n\nOr use the following snippet for `baseline` data:\n\n```html\n\u003cp class=\"ciu-baseline-embed\" data-feature=\"{feature}\"\u003e\u003c/p\u003e\n```\n\n## Example\n\n![caniuse example](./preview/caniuse.webp)\n\n![baseline example](./preview/baseline.png)\n\n## Why ?\n\nIn the past, I often embedded CanIUse data in my technical documents using [https://caniuse.bitsofco.de/](https://caniuse.bitsofco.de/). However, I found that when embedding it, it required loading [@mdn/browser-compat-data](https://github.com/mdn/browser-compat-data) (14MB) and [caniuse/full-data.json](https://github.com/Fyrd/caniuse) (4MB), totaling over 18MB of data, and then needed to be parsed at runtime, resulting in less than 10kb of effective data.\n\n**This consumes too much traffic and seriously affects loading speed!**\n\nTherefore, I decided to redevelop using [Astro](https://astro.build/) and deploy to [Vercel](https://vercel.com/).\n\nBy using **Astro** SSR, a completely independent static page is generated for each feature without requesting any data, and each page is no more than 20kb in size!\n\nMeanwhile, using Github Actions to trigger **Vercel**'s **deployment hooks** every weekend, regenerating new pages and caching them as static files every 7 days to ensure data timeliness.\n\n## Thanks\n\n- [mdn-browser-compat-data](https://github.com/mdn/browser-compat-data)\n- [Fyrd/caniuse](https://github.com/Fyrd/caniuse)\n- [web-platform-dx/web-features](https://github.com/web-platform-dx/web-features)\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengzhanbo%2Fcaniuse-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpengzhanbo%2Fcaniuse-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengzhanbo%2Fcaniuse-embed/lists"}