MDPack

MDPack — Markdown Package

An open, portable package format for Markdown content and its associated assets.

One Markdown package. All assets included.

A .mdpack file is a ZIP container holding a Markdown document, the files it references and a small JSON manifest. Move it, copy it, e-mail it or sync it as a single file and the images come with it. Unzip it and you get a working Markdown document plus an assets/ folder — no rewriting, no special tooling.

architecture.mdpack
├── mimetype          application/vnd.mdpack+zip
├── mdpack.json       manifest: identity, metadata, asset declarations
├── document.md       ordinary Markdown, referencing assets/…
└── assets/
    ├── container-diagram.png
    ├── appendix.pdf
    └── source-data.csv
![Container structure](assets/container-diagram.png)

[Read the appendix](assets/appendix.pdf)

The problem it solves

A Markdown note with pictures is not one thing, it is a .md file plus a folder that has to travel with it. Rename the note and the folder reference rots. Move it to another machine and you discover you moved half of it. Paste the text into a message and the images vanish. The usual workaround, Base64 data URIs, inflates the file by a third and destroys readability and diffs.

MDPack keeps the Markdown as Markdown and puts the whole thing in one file.

The references stay ordinary relative paths, which is the part that matters most: a package is not a walled garden you have to escape from. Unzipping one is the export.

Read the specification

mdpack-format.github.io/spec — or spec/0.2/index.md in this repository (0.1 kept unchanged in spec/0.1/; 0.2 adds the optional encryption profile).

Implementations

Implementation Language Conformance Notes
MD Vault C# / .NET Reader, Writer, Round-trip-preserving Reference implementation
MD Reader Pro C# / .NET Reader, Writer, Round-trip-preserving Viewer and light editor

Built something? Open a pull request adding it here. The only requirement is that it passes the conformance corpus.

Design principles

Status

Specification 0.2.0-draft (0.2 adds the optional mdpack-enc-1 encryption profile; unencrypted packages are unchanged). Implementable and implemented, but not yet stable: incompatible changes may land before 1.0. Implementations should describe their support as draft-level.

The route to 1.0 is one release cycle of implementation feedback plus at least one independent implementation passing the conformance corpus. See GOVERNANCE.md.

Contributing

Questions, ambiguities and implementation reports are all welcome — see CONTRIBUTING.md. If something in the specification is unclear, that is a bug in the specification.

License

Vendor the schema and the test files freely; that is what they are for.