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
- Host: GitHub
- URL: https://github.com/sukso96100/fancycard
- Owner: sukso96100
- License: mit
- Created: 2021-10-11T01:57:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-20T15:50:38.000Z (over 3 years ago)
- Last Synced: 2025-03-28T11:39:41.718Z (3 months ago)
- Language: Go
- Size: 41 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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 websiteInstead 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