One command. Instant page.
Turn any markdown file into a beautifully styled, shareable webpage.
mDrop is a CLI tool that takes a markdown file, renders it as a beautifully styled HTML page, and gives you a shareable URL — all in one command.
$ mdrop README.md --theme brutalist Rendering with brutalist theme... Uploading... https://mdrop.workers.dev/a1b2c3d4- Pre-rendered HTML — All rendering happens locally. Pages load instantly.
- 5 built-in themes — Clean, Brutalist, Terminal, Academic, Playful.
- Configurable expiry — Links expire in 1h, 7d, 30d, or never.
- Self-hosted — Runs on your own Cloudflare Workers account. Free tier. $0.
- Open source — MIT licensed. Fork it, extend it, own it.
Click the button. Cloudflare handles everything — clones the repo, creates KV storage, and prompts you for your API key. All in one flow.
You'll be asked to:
- Choose a Worker name (or keep the default
mdrop) - Set your
API_KEYsecret — pick any strong string, you'll use it in step 3
That's it. Your Worker is live.
npm install -g mdropmdrop init # Paste your Worker URL (shown after deploy) and the API key you chosemdrop file.md # Clean theme, 7-day expiry mdrop file.md --theme brutalist # Choose a theme mdrop file.md --expires 30d # Set link expiry mdrop file.md --expires never # Permanent linkWant your pages at share.yourdomain.com instead of mdrop.workers.dev? If your domain is on Cloudflare:
- Go to Workers & Pages → your mDrop Worker → Settings → Domains & Routes
- Click Add → Custom Domain
- Enter your subdomain (e.g.,
share.yourdomain.com)
Cloudflare handles DNS and SSL automatically. Then run mdrop init again with your new domain.
Choose a theme with --theme <name>. Every page is fully self-contained — CSS inlined, zero external requests.
| Theme | Flag | Description |
|---|---|---|
| Clean | --theme clean | Sans-serif, minimal, light/dark mode. The default. |
| Brutalist | --theme brutalist | Monospace, hard borders, offset shadows. Neo-brutalist. |
| Terminal | --theme terminal | Green on black, scanlines. Hacker aesthetic. |
| Academic | --theme academic | Serif fonts, paper background. LaTeX-inspired. |
| Playful | --theme playful | Rounded, colorful, friendly. |
| Command | Description |
|---|---|
mdrop <file> | Share a markdown file |
mdrop init | Configure Worker URL and API key |
mdrop list | List your shared pages |
mdrop delete <id> | Delete a shared page |
mdrop preview <file> | Preview locally before sharing |
mdrop --help | Show help |
| Flag | Short | Default | Description |
|---|---|---|---|
--theme | -t | clean | Theme name |
--expires | -e | 7d | Link expiry (1h, 7d, 30d, never) |
mDrop is two things:
- CLI (Node.js) — Parses markdown with markdown-it, highlights code with Shiki, wraps in themed HTML, uploads.
- Worker (~50 lines of JS) — Stores HTML in Cloudflare KV, serves it. That's it.
All rendering happens on your machine. The Worker is a trivial static file server. Deploy it once, push content forever — no rebuilds.
| Component | Choice |
|---|---|
| Markdown parser | markdown-it |
| Syntax highlighting | Shiki (inline styles, VS Code accuracy) |
| TOC generation | markdown-it-anchor + markdown-it-toc-done-right |
| Hosting | Cloudflare Workers + KV |
| Link expiry | Native KV TTL (no cleanup logic) |
| Resource | Limit |
|---|---|
| Worker requests | 100,000/day |
| KV reads | 100,000/day |
| KV writes | 1,000/day |
| KV storage | 1 GB |
If you prefer manual setup over the deploy button:
wrangler login git clone https://github.com/vincenthopf/mdrop cd mdrop/worker wrangler kv namespace create "PAGES" # Replace the id in wrangler.toml with the namespace ID from the output wrangler secret put API_KEY wrangler deploymdrop/ ├── cli/ # CLI tool │ ├── bin/mdrop.js # Entry point │ ├── src/ │ │ ├── index.js # Arg parsing, commands │ │ ├── render.js # markdown-it + shiki pipeline │ │ ├── template.js # HTML wrapper │ │ ├── upload.js # Worker API client │ │ ├── config.js # ~/.config/mdrop/config.json │ │ └── themes/ # 5 CSS themes │ └── package.json ├── worker/ # Cloudflare Worker │ ├── src/index.js # ~50 lines: POST/GET/DELETE/LIST │ ├── wrangler.toml │ └── package.json └── site/ # Landing page (Astro) Contributions welcome. Please open an issue first to discuss what you'd like to change.




