Skip to content
Pages
On this page

Business documents

View as Markdown

Documents that leave the repository

Eleven built-in types are business documents: letter, proposal, invoice, contract, memo and report, and the legal set terms, privacy, nda, dpa and sla. They are ordinary notdocs documents, with properties, a place on boards, comments and history, and they are also MDD documents: the frontmatter carries MDD's document-type, date and author, and the body uses MDD's blocks for the parts a professional document has that a wiki page does not.

docs/letters/offer.md
---
id: 01K57Q3M8ZJ0S4V9W2X7Y1AB3C
type: letter
document-type: business-letter
title: Offer
date: 2026-09-16
author: Ada Lovelace
recipient: Kai Tanaka
---

:::letterhead
Acme
1 Analytical Engine Way
London
:::

Dear Kai,

# Offer

We would like to work with you.

Sincerely,

:::signature-block
Ada Lovelace
Founder
:::

A file the MDD tools wrote carries document-type and no type. The first time notdocs sees it, it adds the type that document-type names (business-letter a letter, terms-of-service terms, privacy-policy privacy, the others their own name) and changes nothing else in the file. MDD has no DPA or SLA, so those carry its generic agreement and service-agreement; a file with one of those and no type, or with any other document-type, is a page.

The blocks

BlockWhat it isWhere it goes in Word and print
:::letterhead … :::Who the document is fromThe top of the first page
:::header … :::A line repeated on every page; {{page}} is the page numberThe page header
:::footer … :::The same at the bottomThe page footer
:::contact-info … :::How to reach the senderA block in the flow
:::signature-block … :::Who signs; the rule to sign on is drawn above itA block that stays on one page
::page-breakStart a new page hereA page break
::section-breakA visible break between partsA rule

Blocks do not nest. Inside them, everything is markdown: bold, links, lists and tables all work, and 2^10^ and H~2~O are super- and subscripts.

What each type asks for

Requires :::letterhead and :::signature-block; recommends :::contact-info. Frontmatter: recipient, subject.

Every type takes date (required) and author. On the legal types status is one of MDD's own, draft, pending, approved, final or archived. A DPA is MDD's agreement and an SLA its service-agreement; the notdocs type is the shorter name, the way letter is MDD's business-letter. docs.validate, notdocs validate and the workspace check the frontmatter against the schema and the body against these requirements; a missing required block is an error, a missing recommended one a note.

Templates

notdocs docs new docs/letters/offer.md --template letter starts from a template with the letterhead, the blocks the type needs and placeholder text to replace. Every type has a template of its name, and competitive and research are two more reports. The workspace's new-document dialog lists them all. A repository can replace any of them with its own file in docs/_templates/, which is where a real letterhead belongs.

Export

Export in the document's top bar. Word document downloads a .docx made by @markdownkit/md-docx, with the header and footer as real page furniture. Print or save as PDF opens the print preview: the document on A4 sheets as it prints, with its letterhead, header and footer, and a new sheet at each ::page-break, in white whatever the app's theme. Its button opens the browser's print dialog on exactly that page, where Save as PDF makes the file. The command palette (⌘K) offers the same on an open document. Any document prints this way; one with no MDD blocks prints as plain pages with the same stylesheet.

On paper the header and footer move into the page margin and repeat on every page, with {{page}} as the page number; on screen, and in the preview, they show once, at the top and the end of the document. Chrome and Edge print them that way; Firefox and Safari cannot draw in the page margin yet and print the document without them, so print from Chrome or Edge when the header and footer matter.