code-snippet-images

Installation
SKILL.md

Code Snippet Images

Generate high-resolution code snippet PNGs using HTML templates rendered with Chrome headless at 2x scale.

Quick Start

  1. Copy the template from assets/template.html to a temp file
  2. Replace <!-- FILENAME --> with the title bar text (e.g., filename or description)
  3. Replace <!-- CODE CONTENT --> with syntax-highlighted HTML (see Syntax Highlighting below)
  4. Render with scripts/render.sh:
scripts/render.sh /tmp/snippet.html /tmp/snippet.png
# Produces 2400x1350 PNG (1200x675 at 2x scale)

Design Specs

  • Viewport: 1200×675px, rendered at 2x scale → 2400×1350px output
Related skills

More from freekmurze/dotfiles

Installs
1
GitHub Stars
945
First Seen
5 days ago