GitHub README Integration
Embedding dynamic SVGs in GitHub profileREADME.md files requires understanding GitHub’s Camo CDN Proxy, caching headers, and dark/light mode switching.
1. Embedding with Automatic Dark/Light Mode
GitHub’s Markdown renderer natively supports the HTML<picture> element with prefers-color-scheme media queries:
2. Embedding Standalone Widgets
You can embed multiple individual widgets side-by-side or stacked:3. GitHub Camo CDN Proxy Considerations
GitHub proxies all images through its Camo CDN (https://camo.githubusercontent.com/...).
How Camo Handles SVGs:
- Camo caches responses based on standard HTTP
Cache-ControlandETagheaders. - GitAscii returns
s-maxage=3600, stale-while-revalidate=7200to ensure GitHub caches the image for 1 hour while updating seamlessly in the background. - Camo strips external network requests within SVGs (e.g.
<image href="http://...">), which is why GitAscii’sembedExternalImagesconverts all remote assets to base64data:URIs or directly inlines SVG code.
4. One-Click Sync with Special Repository
When logged in via GitHub OAuth on GitAscii, the Sync Profile button directly creates or updates.gitascii.json and your README.md inside your special profile repository (github.com/:username/:username).