Simon Willison 7/7/2026

github-code Web Component

Read Original

This article describes an experimental Web Component called 'github-code' that allows embedding code snippets directly from GitHub URLs. It converts GitHub blob URLs to raw.githubusercontent.com links, fetches the file content, and displays a specified range of lines with line numbers but no syntax highlighting. The component is built using GPT-5.5 and a specific prompt, showcasing a practical tool for developers to share code snippets inline on web pages.

github-code Web Component

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet