md-to-html
Markdown to HTML
Converts markdown files to self-contained, styled HTML optimized for copying into Google Docs. Tables get proper borders, code blocks are styled, and images are embedded.
Usage
Run the script via bunx:
bunx ~/nixos-config/modules/programs/claude-code/skills/md-to-html/md-to-html.ts "<markdown-file>"
What it does
- Converts markdown to HTML via pandoc (uses
nix runif not installed) - Applies clean, modern CSS (system fonts, bordered tables, styled code blocks)
- Embeds all images as base64 (self-contained)
- Opens the result in the default browser
- User can then Cmd+A, Cmd+C, paste into Google Docs
Output
- Creates
/tmp/<filename>.html - Opens in browser automatically
CSS Features
- System fonts (SF Pro, Segoe UI, etc.)
- Tables: auto-width, 1px borders, grey headers
- Code blocks: light grey background, rounded corners
- Blockquotes: left border accent
- Images: max-width 100%
- Reasonable max-width container (900px)
Notes
- Requires pandoc (script will use
nix run nixpkgs#pandocas fallback) - Images in markdown must be accessible from the markdown file's directory
- Best results when copying from Safari/Chrome to Google Docs
More from michaelvessia/nixos-config
proxmox
|
15mermaid-to-png
Convert mermaid diagrams in markdown files to PNG images. Use when the user wants to export markdown with mermaid to formats that don't support mermaid (Google Docs, PDF, etc).
14paperless
Search and manage documents in Paperless-ngx document management system. Use when the user asks about documents, invoices, receipts, tax forms, bills, or wants to search their document library.
13obsidian-save
|
12qmd
|
11home-assistant-manager
Expert-level Home Assistant configuration management with efficient deployment workflows (git and rapid scp iteration), remote CLI access via SSH and hass-cli, automation verification protocols, log analysis, reload vs restart optimization, and comprehensive Lovelace dashboard management for tablet-optimized UIs. Includes template patterns, card types, debugging strategies, and real-world examples.
11