Writing documentation in markdown
A practical guide to the few symbols you need, and to a simple shape for three documents that teams rely on: the RFC, the runbook and the policy.
What markdown is
Markdown is a way of formatting plain text with ordinary characters. John Gruber published it in 2004. Because early descriptions left some cases open, the CommonMark project later wrote a precise specification that many tools follow. A markdown file reads sensibly as it is, and a program can turn it into a formatted page.
The syntax you will use most
# Title of the document
## A section
### A smaller section
A paragraph with **strong** and *emphasised* words.
- A list item
- Another item
1. A first step
2. A second step
[Text of a link](https://example.com)
`a short piece of code`
That is enough for most documents. Tables, task lists and footnotes are extensions: they work in some tools and not in others, so check before you depend on them.
Why plain text suits documentation
- It travels. Any text editor can open it, today and later.
- Changes are visible. Version control shows exactly which lines changed, and who changed them.
- It can sit beside code. A design note or a runbook can be reviewed in the same way as the work it describes.
- Structure comes first. With few styling choices, attention goes to headings, order and wording.
A shape for an RFC
An RFC, or request for comments, asks others to examine a proposal before work starts. Keep it short enough to be read in one sitting.
# RFC: Move search to its own service
## Problem
## Proposal
## Alternatives considered
## Risks and rollback
## Open questions
## Decision and date
State the problem in terms a reader outside the team can follow. Record the alternatives you rejected, with the reason, so that nobody has to reopen the question without new information. Fill in the decision when it is made.
A shape for a runbook
A runbook is read under pressure, so write it for someone who is tired and in a hurry.
# Restore the database
## When to use this
## Before you start
## Steps
## How to confirm it worked
## If it did not work
## Owner and last tested date
Number the steps. Put one action in each step and show the expected result. Say who to call when a step fails. Rehearse the runbook from time to time and write down the date, because an untested procedure is only a hope.
A shape for a policy
A policy says what must happen, for whom, and who answers for it.
# Policy: Keeping records
## Purpose
## Scope
## Rules
## Responsibilities
## Exceptions
## Review date and approver
Use direct words such as "must" and "may", and use them consistently. Keep procedures in a separate document, so that the steps can change without the rule being approved again.
Reviewing a document
Ask for a review with a clear question: is the proposal sound, do the steps work, or is the rule unambiguous? Name the people whose answer you need and the date you need it by. Reviewers should comment on the line concerned and say what would settle the point, so that the author can act without a meeting.
When the review ends, answer every comment, either with a change or with the reason for leaving the text as it is. Then record who approved the document and when. A reader who arrives a year later can see what was decided, who agreed and which doubts were raised, without searching through chat messages.
Habits that keep documents useful
- Give every document one owner.
- Put the answer first, and the history after it.
- Use headings that say what the section tells the reader.
- Link to the source of a fact instead of copying it.
- Set a review date, and delete or mark what is no longer true.
- Keep comments close to the lines they refer to, and resolve them.
Where Zarreo fits
Zarreo is a markdown editor we are building for documents like these. It is not open yet, and nothing described here is a feature you can use today. The planned list shows what the first version is meant to include. Which markdown extensions it will support has not been published.
Want to hear when it opens?
One email to hello@zarreo.com is enough. No form, no account, and nothing to pay.