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.
You will also need Chrome or Chromium installed on your system to make this program work properly.
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 or Twitter card Image meta tag
https://
/url?
template=
&
=
&
=
& ...
fancycard.app.com
)- Built in templates:
simple.html
- Remote template URL: e.g.
https://raw.githubusercontent.com/sukso96100/fancycard/main/tmpl/templates/simple.html
- Built in templates:
- e.g.
Title
,Date
,Author
,Img
... - Check template file for what template requires
- e.g.
- e.g.
Hello world
- e.g.
... "> Example usage
<html> <head> <meta property="og:image" content="https:///url?template= " /> <meta name="twitter:image" content="https://& = & = & ... /url?template= " /> head> ... 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> <head> <meta property="og:image" content="https:///meta?url= " /> <meta name="twitter:image" content="https:///meta?url= " /> <meta name="fancycard:template" content="simple.html" /> <meta name="fancycard:" content=" " /> <meta name="fancycard:Title" content="Hello world!" /> head> ... html>
License
MIT License