Dealerdirect style guide: Markdown

“Life moves so fast. You gotta document the good times, man.” ~ Big Boi

This guide defines the Markdown coding standards we use at Dealerdirect. The intent of this guide is to reduce cognitive friction when scanning the Markdown source from different author, gain documentation of higher quality and gain more compatibility across different Markdown renders.

For almost every language a style guide exists, somehow Markdown is an exception. There are several attempts, but none of the guides seems to be complete or they just simply cover (almost) every single option Markdown has to offer. As a result, the Dealerdirect Markdown style guide was born.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

Table of contents

1. Basics

1.1. Filenames

Good filenames:

markdown-style-guide.md
introduction-into-coding.md
hello-world.md

Bad filenames:

.markdown-style.guide.md
-introduction-into-coding.md
the-hello-world-example.md
double--hypens.md

1.2 Files

1.3 Language

2. Headings

3. Emphasis

4. Blockquotes

5. Lists

5.1. Unordered lists

5.2. Ordered lists

5.3. Task lists

6. Horizontal rules

This is an example of a horizontal rule.

-------------------------------------------------------------------------------

80 Hyphens, preceded and followed by a newline.

7. Code

7.1. Inline code

7.2. Code blocks

Note: Code blocks shown inside the above code block examples are indented. Even tough this is against the rules in this guide, it is the only way of displaying a Markdown fenced code block inside a Markdown fenced code block.

8.4. Linking to books, blogs and other external documents

9. Images

Examples:

![alt text](image.png "Image title")

[![Google][first google logo]][google]

[google]: http://www.google.com "Google Search"
[first google logo]: https://en.wikipedia.org/wiki/Google_logo#/media/File:First-google-logo.gif "Google Logo"

10. Tables

Correct example:

| Tables  | Are     | Cool  |
| ------- | ------- | ----- |
| apples  | a lot   | $1600 |
| bananas | a dozen | $12   |
| grapes  | one     | $1    |

Incorrect example:

Tables | Are | Cool
--- | --- | ---
apples | a lot | $1600
bananas | a dozen | $12
grapes | one | $1

11. Emoji

12. HTML

Example:

This text is normal **Markdown**.

<p align="center">
  This text is centered using <b>HTML</b>.
</p>

This text is normal **Markdown** again.

References

^1: No newline at end of file - Mike Burns

^2: MARKDOWN, STRIKETHROUGH, AND SLACK - John Gruber