{"id":17621225,"url":"https://github.com/dev-warner/post-cards","last_synced_at":"2025-03-30T01:18:32.326Z","repository":{"id":51308676,"uuid":"365584607","full_name":"dev-warner/post-cards","owner":"dev-warner","description":"@post-cards/core is a small node library for generating OpenGraph images for social media sharing. 📬","archived":false,"fork":false,"pushed_at":"2021-05-16T15:27:32.000Z","size":319,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T13:21:27.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/dev-warner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-08T18:27:06.000Z","updated_at":"2021-05-15T22:39:29.000Z","dependencies_parsed_at":"2022-09-02T22:00:21.577Z","dependency_job_id":null,"html_url":"https://github.com/dev-warner/post-cards","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-warner%2Fpost-cards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-warner%2Fpost-cards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-warner%2Fpost-cards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-warner%2Fpost-cards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-warner","download_url":"https://codeload.github.com/dev-warner/post-cards/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262600,"owners_count":20749175,"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":[],"created_at":"2024-10-22T20:11:56.490Z","updated_at":"2025-03-30T01:18:32.305Z","avatar_url":"https://github.com/dev-warner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# post-cards 📬\n\n[![Coverage Status](https://coveralls.io/repos/github/dev-warner/post-card/badge.svg?branch=main)](https://coveralls.io/github/dev-warner/post-card?branch=main)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)\n\n`@post-cards/core` is a small node library for generating OpenGraph images for social media sharing. 📬\n\n- [Templates](https://github.com/dev-warner/post-card-templates)\n- [Documentation](https://dev-warner.github.io/post-card/)\n\n\u003cbr\u003e\n\n## What is OpenGraph?\n\n---\n\n\u003cbr\u003e\n\nSimply as [opengraph.xyz](https://www.opengraph.xyz/) describes:\n\n\u003e Social networks and messaging apps use the Open Graph meta tags to display your website.\n\n- [Open Graph documentation](https://ogp.me/)\n- [Open Graph card validator](https://www.opengraph.xyz/)\n\n## Getting Started\n\n```bash\nnpm i @post-cards/core -D\n```\n\n```typescript\nimport generate from '@post-cards/core'\nimport BasicTemplate from '@post-cards/basic-template'\n\nawait generate(\n  new BasicTemplate({\n    text: '#fff',\n    background: '#000',\n    accent: 'orange',\n  }),\n  [\n    {\n      output: 'media/home-page.png',\n      data: {\n        title: 'My great Home Page',\n      },\n    },\n    {\n      output: 'media/about-page.png',\n      data: {\n        title: 'My great About Page',\n      },\n    },\n  ],\n  {\n    concurrency: 10,\n    ...options,\n  }\n)\n```\n\n### Template override\n\nSometimes you might not want the same template for each item but still want to batch them together.\n\n```typescript\nawait generate(Template, [\n  { output: 'media/first-image.jpg', data: {} },\n  {\n    output: 'media/second-image.jpg',\n    data: {},\n    options: { templateOveride: FancyTemplate },\n  },\n])\n```\n\n## Creating Templates\n\nCreating template is an easy process, if you've ever worked with html canvas, creating templates should be a breeze, and we provide some utils to smooth out the process.\n\nFor more information: [Templates](https://github.com/dev-warner/post-card-templates)\n\n## Contributting Guide\n\nSome resources:\n\n- Our [CONTRIBUTING.md](CONTRIBUTING.md) to get started with setting up the repo.\n\n- Our [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) if you contribute i'd appreciate sticking to our code of conduct.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-warner%2Fpost-cards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-warner%2Fpost-cards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-warner%2Fpost-cards/lists"}