The Wayback Machine - https://web.archive.org/web/20201004214204/https://github.com/bep/twittercard-proxy
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Twitter Card Proxy

*Nix Build Status CircleCI Windows Build status GoDoc Go Report Card

Hugo 0.24 Tweet

The above screenshot is the single motivation behind this tool: To get nicer looking Twitter cards when announcing GitHub-releases. GitHub provides some Twitter metadata, but it is for your account only, and just linking to the release page gets you a rather blend Twitter card.

Install

Download a binary from releases.

twittercard-proxy is a Go application, so you can also easiliy compile it yourself or intall it is via go get:

 go get -v github.com/bep/twittercard-proxy

Use

▶ ./twittercard-proxy -h
Usage of ./twittercard-proxy:
  -f string
    	The JSON filename with twitter cards (default "./twittercards.json")
  -http string
    	The HTTP listen address (default "0.0.0.0:1414"

To add or modify Twitter cards, just edit the JSON file and send a SIGHUP signal to the server process:

kill -s SIGHUP <process-id>

File format

The id below will become the path and target is the proxy target.

The rest are Twitter Card properties, see https://dev.twitter.com/cards/types/summary-large-image.

[
	{
		"id": "hugo-0.24",
		"site": "@GoHugoIO",
		"creator": "@bepsays",
		"image": "https://s11.postimg.org/jsd2aq1er/hugo-24-poster.png",
		"title": "The Revival of the Archetypes!",
		"description": "In the new Hugo 0.24, archetype files are Go templates with all funcs and the full .Site available, for all content formats.",
		"target": "https://github.com/gohugoio/hugo/releases/tag/v0.24"
	}
]

About

Create pretty Twitter Cards for your GitHub releases etc.

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.