Introducing gisthost.github.io

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Developers can now host renderable HTML pages straight from GitHub Gists at gisthost.github.io, fixing Substack-mangled URLs and truncated large files.

Read this as

Simon Willison launched gisthost.github.io, a fork of a decade-old project called gistpreview that stopped being updated. GitHub Gists, a way to save small files on GitHub, normally display only as plain text, and this site lets you view them as real web pages by adding the Gist's ID to a web address. Willison fixed two problems: links shared through the newsletter service Substack were being mangled, and files too large to come back through GitHub's API were cut off. Anyone sharing HTML files, such as exported transcripts of AI coding sessions, can now share them as viewable pages.

Willison forked gistpreview, an unmaintained ten-year-old utility, into gisthost.github.io to serve web pages hosted in GitHub Gists, which GitHub otherwise delivers only as plain text. His fixes address two user-facing bugs: Substack emails corrupt the shared URLs, and large files exceed the limits of GitHub's Gist JSON API. His claude-code-transcripts tool, version 0.5, now publishes to the new host. Ongoing hosting is effectively free, since GitHub Pages serves the site and Gists sit behind GitHub's CDN.

Gist raw files are served as text/plain with X-Content-Type-Options: nosniff, so browsers never render them as HTML; gistpreview worked around this by fetching the Gist via api.github.com, parsing the JSON, and injecting the chosen file with document.write(), which unlike innerHTML executes inline scripts. Willison's fork reads the Gist ID up to the first equals sign, fixing Substack's ?id=&utm_source... URL mangling, and handles files truncated by the Gist API. Dependencies (jQuery, Bootstrap, a fetch polyfill) were removed and the code inlined into one index.html. claude-code-transcripts 0.5 now publishes its --gist output to gisthost.github.io.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

gisthost.github.io gistpreview.github.io GitHub Gists Substack claude-code-transcripts GitHub Pages

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading