Skip to content

statico/fixgithub.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fixgithub.com

Important

Vibe-coded with Claude Code. This entire repo โ€” design spec, implementation, landing page, and deployment runbook โ€” was produced in a single session of natural-language prompting. No keystrokes were harmed; review the diffs before trusting them.

A tiny proxy that brings GitHub link previews back to Slack, Discord, Teams, and Twitter.

GitHub serves rich Open Graph and Twitter Card meta tags on every page. Most chat apps, however, no longer unfurl github.com URLs โ€” for some this is policy, for others it's a bug they never fixed. fixgithub.com fetches the GitHub page you point it at, extracts the og:* and twitter:* tags GitHub already produced, and re-emits them on a tiny HTML page that any unfurl bot will happily preview. Humans get redirected straight back to the real GitHub URL.

Inspired by statico/ycombinator1.com, which does the same thing for Hacker News.

Usage

Replace github.com with fixgithub.com in any URL:

https://github.com/foo/bar/issues/3   โ†’   https://fixgithub.com/foo/bar/issues/3

For gists, use the gist. subdomain:

https://gist.github.com/user/sha   โ†’   https://gist.fixgithub.com/user/sha

Paste the rewritten link into Slack/Discord/etc. The unfurl will show the GitHub title, description, and image. Clicking the link redirects to the real github.com page.

Debug mode

Append ?fixgithub_debug=1 to any URL to see the extracted meta tags as JSON:

curl 'https://fixgithub.com/torvalds/linux?fixgithub_debug=1'

How it works

A single Vercel serverless function:

  1. Receives the request and picks the upstream host (github.com or gist.github.com) based on the incoming subdomain.
  2. Fetches the same path from GitHub with an 8-second timeout.
  3. Streams the response, stopping at </head> or 64 KB โ€” whichever comes first.
  4. Sweeps the head for <title>, og:*, and twitter:* meta tags.
  5. On repo root pages (/owner/repo), collapses GitHub's redundant GitHub - owner/repo: <description> title down to just owner/repo so unfurls don't show the same line twice. Other pages pass through verbatim.
  6. Re-emits them on a minimal HTML page with a meta-refresh + JS redirect to the canonical GitHub URL.

Zero runtime dependencies. Vercel's edge cache handles repeats (s-maxage=3600, stale-while-revalidate=86400).

Deployment

# Repo setup
git init
pnpm install
curl -o public/favicon.ico https://github.com/favicon.ico

# Vercel
vercel link                            # create new project: fixgithub-com
vercel --prod                          # first deploy
vercel domains add fixgithub.com
vercel domains add www.fixgithub.com
vercel domains add gist.fixgithub.com

# Cloudflare DNS โ€” add three CNAMEs (DNS-only / gray cloud):
#   @     CNAME  cname.vercel-dns.com
#   www   CNAME  cname.vercel-dns.com
#   gist  CNAME  cname.vercel-dns.com

# Verify
curl -I  https://www.fixgithub.com/foo                       # โ†’ 301 to apex
curl -sL https://fixgithub.com/statico/ycombinator1.com | grep og:title
curl -sL https://gist.fixgithub.com/<user>/<sha>        | grep og:title

License

Unlicense โ€” public domain.

About

๐Ÿ› ๏ธ Tiny proxy that brings GitHub link previews back to Slack, Discord, Teams, and Twitter โ€” add 'fix' in front of github.com.

Topics

Resources

License

Stars

Watchers

Forks

Contributors