Skip to main content

GitHub README Integration

GitAscii v2 embeds self-contained SVGs published to the repository’s gitascii branch. The rendering workflow runs ahead of the README request, so profile availability does not depend on the GitAscii rendering API.

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 additional profiles

Each profile slug has its own pair of published SVG files:

3. GitHub Camo CDN Proxy Considerations

GitHub proxies all images through its Camo CDN (https://camo.githubusercontent.com/...).
GitHub may proxy README images through Camo and cache them. Refreshing the SVG on the gitascii branch updates the stable source URL, but a viewer may briefly see a cached copy. The publishing Action inlines permitted remote assets into the SVG before committing it.

4. One-Click Sync with Special Repository

After GitHub sign-in and GitHub App authorization, Publish to GitHub updates the gitascii branch, the repository workflow, and the profile README.md. It also renders the initial files; the workflow handles subsequent scheduled or manual refreshes. Named profile embeds have GITASCII:[slug] markers so they can be updated or removed independently. The HTTP SVG routes remain available for previews and integrations. If you enable Pro dynamic rules for the default profile, GitAscii generates an API embed with ?dynamic=1; that is the explicit mode that evaluates a profile choice on each eligible request. The standard GitHub-hosted <picture> embed does not evaluate rules at view time. For Pro analytics, place the separately generated GitAscii badge beside the profile <picture>. It measures requests to the badge endpoint, usually from GitHub’s image proxy, and does not count individual people or exact README views. Publication health comes from authenticated GitHub Action reports.