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

https://github.com/sukso96100/fancycard

Easily customizable Social image (or Open graph image) generator
https://github.com/sukso96100/fancycard

Last synced: 2 months ago
JSON representation

Easily customizable Social image (or Open graph image) generator

Awesome Lists containing this project

README

        

[![CI](https://github.com/sukso96100/fancycard/actions/workflows/ci.yml/badge.svg)](https://github.com/sukso96100/fancycard/actions/workflows/ci.yml)

# fancycard
Easily customizable Social image (or Open graph image) generator
Built with Go, Gin, GoQuery and Chromedp

## Build & Run
Simply, Clone this repo, build and run with Go Toolchain.
You can get Go Toolchain from [here](https://golang.org/dl/).
You will also need Chrome or Chromium installed on your system to make this program work properly.
```bash
git clone https://github.com/sukso96100/fancycard.git
cd fancycard
go build -o fancycard .
./fancycard
```

## Render Social image

### Pass all required data via URL

Build a URL using `/url` API with following format, Then place URL in your webpage as [Open Graph Protocol Image meta tag](https://ogp.me/) or [Twitter card Image meta tag](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started)
```
https:///url?
template=
&=
&=
& ...
```

- ``: Address of fancycard server where fancycard instance is hosted (e.g. `fancycard.app.com`)
- ``: Path or URL to tempalte writtn in HTML and Go Template syntax
- Built in templates: `simple.html`
- Remote template URL: e.g. `https://raw.githubusercontent.com/sukso96100/fancycard/main/tmpl/templates/simple.html`
- ``: Key of the parameter that the template requires
- e.g. `Title`, `Date`, `Author`, `Img`...
- Check template file for what template requires
- ``: Value for template parameter
- e.g. `Hello world`

#### Example usage
```html







...

```
### Let fancycard to scrap required data from your website

Instead of building super-long URL, Use `/meta` API, And put required data as meta tags with `name="fancycard:"` attributes.

#### Example usage
```html










...

```

## License
MIT License