# GitHub repository OG image template

Owner and repository name, description, stars, forks and language — a repository social card.

- Slug: `github-repo`
- Preview (real render): https://shareglint.com/img/templates/github-repo.jpg
- Page: https://shareglint.com/en/templates/github-repo

For open-source projects, package pages and developer blogs. Flat and white like the repository cards developers already recognise, with the language colour as a bar along the bottom — set `accent` to your language's colour.

## Fields

Every field is optional. Long text shrinks to fit instead of overflowing; an image field takes a public URL that we fetch on our side.

| Field | Type | Description | Example |
|---|---|---|---|
| `repo` | text | Repository name. (default: repository) | og-kit |
| `owner` | text | Repository owner (user or organisation). | northwind |
| `description` | text | Repository description. | Typed helpers for generating Open Graph images at build time and on the edge. |
| `stars` | text | Star count, e.g. 12.4k. | 12.4k |
| `forks` | text | Fork count, e.g. 1.1k. | 1.1k |
| `language` | text | Main programming language. Set `accent` to its colour. | TypeScript |
| `site` | text | Host shown in the corner, e.g. github.com. | github.com |
| `avatar` | image URL | Owner avatar or project logo. | https://example.com/images/logo-northwind.png |
| `accent` | colour | Brand colour as hex, e.g. #6366f1. Drives buttons, highlights and the background glow. (default: #3178c6) | #3178c6 |
| `theme` | dark | light | Colour scheme: dark or light. (default: light) | — |

## Render it with one request

```bash
curl -X POST "https://shareglint.com/v1/images?wait=true" \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "github-repo",
    "modifications": {
        "repo": "og-kit",
        "owner": "northwind",
        "description": "Typed helpers for generating Open Graph images at build time and on the edge.",
        "stars": "12.4k",
        "forks": "1.1k",
        "language": "TypeScript",
        "site": "github.com",
        "avatar": "https://example.com/images/logo-northwind.png"
    }
}'
```

## Make it yours

accent and theme change per request. For anything more, copy the template into your account: you get an ordinary HTML template with the same fields that you can edit in the dashboard or through the API. If the slug is free on your account, the copy takes it — your integrations switch to your version without changing a line.

```bash
curl -X POST "https://shareglint.com/v1/templates/library/github-repo/copy" -H "Authorization: Bearer sk_live_YOUR_KEY"
```
