Claude-skill-registry-data markdown-to-standalone-html
Convert Markdown documents (*.md files) to self-contained HTML files with embedded images. Use when you need a portable, offline-friendly single HTML file from Markdown—ideal for blog posts, essays, reports, or any content that should work without external dependencies.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/markdown-to-standalone-html" ~/.claude/skills/majiayu000-claude-skill-registry-data-markdown-to-standalone-html && rm -rf "$T"
manifest:
data/markdown-to-standalone-html/SKILL.mdsource content
Markdown → Standalone HTML (Embedded Images)
Overview
Convert any Markdown file into a single self-contained HTML document with all images embedded as base64 data URIs. No external hosting required—the output is a single
.html file that works offline.
Requirements
— Markdown → HTML conversionpandoc
— Script executionruby
Both must be on your
PATH. The script checks and exits with a clear error if missing.
Workflow
- Prepare your Markdown — Any
file with images (local paths or public URLs).md - Run the conversion script with the Markdown file, title, and output path
- Resolve images — If images can't be found locally, you'll be prompted for a file path or URL
- Get your HTML — A single
file with all images embedded, ready to share.html
Image Resolution
For each image in your Markdown:
- Relative path — Resolved relative to the Markdown file's directory
- Absolute path — Used as-is if it exists
- Public URL (
orhttp://
) — Downloaded to temp directory, embedded, then cleaned uphttps:// - Unresolved — You're prompted to provide a local file path or URL
All images in the final HTML are base64-encoded and embedded directly—no external dependencies.
Limitations
- Only rewrites
tags (not CSS<img src="">
URLs)background-image - Does not guess missing images; prompts interactively instead
- Untrusted SVG can contain scripts—review embedded SVG carefully
Script Reference
Script:
scripts/markdown_to_standalone_html.rb
Usage:
ruby .github/skills/markdown-to-standalone-html/scripts/markdown_to_standalone_html.rb \ /path/to/post.md \ --title "Your Post Title" \ --template .github/skills/markdown-to-standalone-html/assets/template.html \ --out /path/to/output.html
Arguments:
— Path to your Markdown file (required)markdown
— Title for the HTML document (required; displayed in browser tab and header)--title
— Path to the HTML template (required; use the provided--template
)assets/template.html
— Path where the final HTML will be written (required)--out