{"id":16230080,"url":"https://github.com/skorfmann/og-link","last_synced_at":"2025-04-03T08:32:24.513Z","repository":{"id":181156110,"uuid":"666321922","full_name":"skorfmann/og-link","owner":"skorfmann","description":"Generate Open Graph images with Satori on Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2023-08-10T21:08:51.000Z","size":82,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T23:27:08.557Z","etag":null,"topics":["cloudflare-workers","opengraph","resvg","satori"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skorfmann.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}},"created_at":"2023-07-14T08:20:59.000Z","updated_at":"2025-01-09T10:08:36.000Z","dependencies_parsed_at":"2024-11-04T04:51:32.917Z","dependency_job_id":null,"html_url":"https://github.com/skorfmann/og-link","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"553e714c923757e13022bc1fc8199202a1b8b5a3"},"previous_names":["skorfmann/og-link"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorfmann%2Fog-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorfmann%2Fog-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorfmann%2Fog-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorfmann%2Fog-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skorfmann","download_url":"https://codeload.github.com/skorfmann/og-link/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246966200,"owners_count":20862017,"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":["cloudflare-workers","opengraph","resvg","satori"],"created_at":"2024-10-10T13:00:07.672Z","updated_at":"2025-04-03T08:32:19.498Z","avatar_url":"https://github.com/skorfmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Graph Link\n\nGenerate Open Graph images with [satori](https://github.com/vercel/satori) and a custom fork of [workers-og](https://github.com/kvnang/workers-og/tree/main/packages/workers-og) (mainly to update dependencies).\n\n`workers-og` is using [resvg](https://github.com/yisibl/resvg-js) to turn the `svg` generated by satori into a `png`.\n\n## Usage\n\nThe worker expects a [base64url](https://en.wikipedia.org/wiki/Base64#URL_applications) JSON payload:\n\n```\n{\n  \"title\": \"Hello World\"\n}\n```\n\nwhich then can be assembled in the following url path\n\n`https://\u003cyour-worker-host\u003e/image/\u003cpayload\u003e/og.png`\n\nPlease note, that LinkedIn doesn't accept subdomains on the `workers.dev` domain from Clouflare when scraping for open graph images. Took me a while to figure this out.\n\n## Deploy\n\n```\nnpm install\nwrangler deploy\n```\n\n## Template\n\nThe [src/template.tsx](./src/template.tsx) file was entirely generated with OpenAI's GPT-4.\n\n### Example\n\n```\n{\n  \"title\": \"Kickoff Meetup @ Machine Minds Lisbon\"\n}\n```\n\nturns into this url\n\n```\nhttps://\u003cyour-domain\u003e/image/eyJ0aXRsZSI6IktpY2tvZmYgTWVldHVwIEAgTWFjaGluZSBNaW5kcyBMaXNib24gIn0%3D/og.png\n```\n\nand results in this image (takes ~2 seconds to render)\n\n![open-graph](./og.png)\n\n## Todo\n\n- [ ] Caching of generated images would be nice\n- [ ] Some authenticity check for the payload\n- [ ] Dynamic templates or template elements","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorfmann%2Fog-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskorfmann%2Fog-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorfmann%2Fog-link/lists"}