Generates SVG banners for Numtide's GitHub repositories with automatic metadata fetching.
Add this to any Numtide repository README:
nix run github:numtide/banner-generator#banner-api
nix run github:numtide/banner-generator#banner-cliGET /banner/{owner}/{repo}.svg- Generate SVG banner
The CLI can generate PNG banners for use as GitHub social preview images. It requires Chromium to be installed (uses headless Chrome for rendering).
# Generate PNG banner
banner-cli generate owner/repo -o banner.png
# Generate without stats (for social preview that won't get stale)
banner-cli generate owner/repo --no-stats -o banner.png
# Generate with dark color scheme
banner-cli generate owner/repo --dark -o banner.pngAfter generating, upload the PNG as social preview via: Repository Settings > Social preview > Edit
See deploy/banner-generator.toml for configuration options.
Templates are pure SVG files with specific element IDs that get replaced dynamically:
| Element ID | Description | Example Content |
|---|---|---|
repo-name |
Repository name text | "banner-generator" |
description |
Description text (can contain tspan elements) | "Generate banners..." |
stats-stars |
Stars count text | "1.2k" |
stats-forks |
Forks count text | "45" |
stats-language |
Primary language text | "Go" |
stats-group |
Stats container (hidden if no data) | - |
font-css |
Style element for font injection | - |
nix develop
make dev # Run with hot reload
make build # Build binaries
make test # Run tests
make lint # Run lintersSee CONTRIBUTING.md for guidelines.
MIT