Configuration
Understand the medmark workspace layout and folder conventions.
Workspace folders
medmark uses two directories in your project root:
medmark/ — user data
Visible folder you interact with directly.
medmark/
├── medium-export/ ← paste your Medium export's posts/ folder here
│ └── .gitkeep
└── templates/
└── sample-medmark-template.js ← starter template.medmark/ — tool internals
Hidden folder managed by medmark.
.medmark/
└── logs/ ← debug logs written when --debug is onThe output folder
The output folder defaults to medmark/output but is not created by
init — the conversion run creates it (and any parent folders) on demand, so
pointing --output anywhere else works without extra setup.
medmark/output/
├── <slug>/index.md ← or <slug>.md, see folderForEachSlug
├── registry.json ← content registry, unless disabled
└── conversion_report.json ← per-run statisticsInitialising the workspace
Running either of these creates the workspace folders:
npx medmark init
# or just
npx medmark # auto-inits on first runWhere settings live
medmark has no config file. Everything is configured in one of two places:
| Setting | Configured via |
|---|---|
| Input, output, template, drafts, skip list, debug | CLI flags or the interactive prompts |
| Image strategy, code-block language, folder layout, registry | Your template's getOptions() |
Cross-platform notes
- Both
medmark/and.medmark/are created withfs.mkdirSyncand work identically on macOS, Linux, and Windows. - On Windows,
.medmark/will not be hidden at the OS level (Windows uses file attributes for hiding, not dot-prefixes). It functions correctly regardless. - All paths are built with
path.join()/path.resolve()so separators are always OS-correct. - Template paths are resolved to
file://URLs before being imported, which is what makes custom templates loadable on Windows too.