For this documentation, there are two primary goals:
- Maintain a simple consistency across the entire docset, and
- Documentation should be clean and readable in plaintext as well as Markdown-rendered.
The following guidelines ensure that we meet these goals.
The point behind Markdown is two-fold: make it easy to write lightly styled but well laid out documentation, and provide a way to naturally express documentation that reads in plain text as well as it does when rendered. The best Markdown file does not require any renderer other than a plain text editor, or dumping the contents to a terminal window. While the following guidelines help ensure this, the general rule is to use your best judgement to create good-looking documentation.
Unicode and UTF-8 encoding has freed us from the restrictions of the old ASCII character set. We are
free to use Unicode characters natively in the Markdown source text, and should, whereever
possible. For example, EM DASH (—), RIGHTWARDS ARROW (→), ALMOST EQUAL TO (≈), HORIZONTAL ELLILPSIS
(…) and so forth. If you cannot for some reason enter Unicode characters easily in your editor, you
can also use HTML character entity references such as —
(—), &rarr
; (→),
≈
(≈), …
(…), and so forth.
Exceptions to this rule include code blocks with lines that cannot be wrapped, and table rows which may have long content.
This reads cleanly in plain text.
Use dash underlines to mark H2 headers, of the same length as the header content. Where it makes sense, precede the H2 header with two blank lines.
Markdown allows you to define link values at the bottom of the document. For example, you might have
a link to [Some Random Page]
in your text, but the resulting URL can be defined at the bottom
using a line like this:
[Some Random Page]: things/jawn/stuff/random.md
This keeps the text clean and easy to read, and also provides a way to define a URL only once for the entire document. Blocks of link definitions should be placed at the very bottom of a Markdown file, preceeded by three blank lines.