Overview
Convert your Medium export to Markdown or MDX with ease.
medmark is a CLI tool that converts Medium exported archives into Markdown (or MDX) files, ready to drop into any static-site framework — Next.js, Astro, Hugo, and more.
What it does
- Parses Medium's HTML export format
- Generates clean Markdown with YAML front matter (slug, title, date, tags, images, and more)
- Downloads and remaps images locally or preserves remote CDN URLs
- Inlines GitHub Gists and embedded tweets into the Markdown body
- Builds a content registry — a
registry.json/registry.tsmanifest, an RSS feed, and a sitemap - Supports custom templates so you control the output shape
- Skips reply posts and optionally exports drafts
How it works
npx medmarkOn first run medmark creates a medmark/ workspace in your current directory, then walks you through a short interactive prompt to point it at your Medium export archive.
Workspace layout
After medmark init (or the first medmark run):
my-project/
├── medmark/
│ ├── medium-export/ ← paste your Medium export's posts/ folder here
│ └── templates/ ← optional custom templates
└── .medmark/
└── logs/ ← debug logsThe output folder (medmark/output/ by default) is created by the conversion
run itself, not by init. Alongside the converted posts it contains a
conversion_report.json and, unless disabled, the generated registry files.