type: service
status: active
timestamp: 2026-06-20
tags: [code-snippet, embed, static, primary]

GitHub Gists

Static code snippets embedded via script — free unlimited public gists

GitHub Gists

Role

Hosts static code snippets embedded in oriz-blog-site posts — copy-paste fragments, config blocks, one-file utilities, anything where a runnable playground is overkill and we just want syntax- highlighted code with a “view raw” link. Embedded via gist’s <script src="...js"> one-liner (turns into a styled <div> with GitHub’s syntax theme).

Free tier

Card / subscription required?

NO. Comes with the free GitHub account we already have for oriz-master-repo. No separate sign-up, no payment method.

Embed pattern

<script src="https://gist.github.com/chirag127/abc123def456.js"></script>

To embed a single file from a multi-file gist:

<script src="https://gist.github.com/chirag127/abc123def456.js?file=oriz-config.ts"></script>

Gist embeds inject their own stylesheet (gist.github.com origin) — we let them through CSP via style-src https://github.githubassets.com.

Alternatives

Swap cost

Zero — the gist source IS a git repo, git clone https://gist.github.com/<id>.git and re-host anywhere. The post-side coupling is one <script> tag.

Why this is our pick

Already part of our GitHub account, costs nothing extra, embeds are accessible (real text, not images), and revision history means if we update the snippet the embed updates everywhere it’s referenced. For “screenshot-style” code blocks in social cards we use Ray.so instead — Gists are for in-post embeds where the reader needs to copy-paste.

Cross-refs


Edit on GitHub · Back to index