An open API service indexing awesome lists of open source software.

https://github.com/egoist/preview-card

Customizable social media preview image
https://github.com/egoist/preview-card

Last synced: 11 months ago
JSON representation

Customizable social media preview image

Awesome Lists containing this project

README

          

# @egoist/preview-card

Customizable social media preview image, like this one:

preview

## Install

```bash
yarn add @egoist/preview-card
```

**NOTE: this module relies on Chrome (or Chromium) browser, make sure you have it installed on your machine before running this module**.

## Usage

```ts
import { getImage, stopBrowser } from '@egoist/preview-card'

const imageBuffer = await getImage({
title: 'your title',
description: 'your description',
domain: 'your domain',
themeColor: '#e02423', // optional
})

// Close the browser when you no longer need to use this module
await stopBrowser()
```

## CLI Usage

```bash
preview-card out.png --title title --domain domain --desc description

# All flags
preview-card --help
```

## Inspiration

Thanks to [Mugshot Bot](https://www.mugshotbot.com/) for the original design inspiration.

## License

MIT © [EGOIST](https://github.com/sponsors/egoist)