Authoring content
Tech Docs content is written in Markdown which is a markup language used for formatting plain text that aims to be easy to read and write.
Tech Docs uses GitHub-flavored Markdown, a variant of Markdown syntax, and SmartyPants, a typographic punctuation plugin. These tools provide authors niceties like generating clickable links from text, creating lists and tables, formatting for quotations and em-dashes, and more.
Commonly-used Markdown syntax
Common use of Markdown throughout Tech Docs includes:
Headings
Start a new line with between 2 and 6 #
symbols, followed by a single space, and then the heading text.
The number of #
symbols corresponds to the heading level in the document hierarchy. The first heading level is reserved for the page title (available in the page frontmatter). Therefore the first authored heading on every page should be a second level heading (##
).
Links
Create a link by wrapping the link text in brackets ([ ]
) followed by the external link URL, or internal link path, wrapped in parentheses (( )
).
There should be no space between the wrapped text and URL. When linking to an internal Tech Docs page, use the relative path from the current page, and omit the page file extension (.md
).
Emphasizing text
Wrap text to be emphasized with _
for italics, **
for bold, and ~~
for strikethrough.
Paragraphs
Create paragraphs by leaving a blank line between lines of text.
Lists
Precede each line in a list with a dash (-
) for a bulleted list, or a number followed by a period (1.
) for an ordered list.
Code examples
Wrap inline code with a single backtick (`
).
Wrap code blocks with triple backticks (```
), also known as a “code fence”, placed just above and below the code. Append the name of the code’s language or its file extension to the first set of backticks for syntax highlighting.
Asides
Asides are useful for highlighting secondary or marketing information.
Wrap content in a pair of triple colons (:::
) and append one of the aside types (ie: note
) to the first set of colons. The aside types are note
, tip
, caution
, and danger
, each of which have their own set of colors and icon. Customize the title by wrapping text in brackets ([ ]
) placed after the note type.
Images
Show an image using an exclamation point (!
), followed by the image’s alt text (a brief description of the image) wrapped in brackets ([ ]
), followed by the external URL, or internal path, wrapped in parentheses (( )
).
Frontmatter
Tech Docs uses YAML frontmatter as a way to add metadata to pages for dynamic purposes. Frontmatter is a block of YAML syntax used to assign variables and more, wrapped in triple dashes (---
). Every page must have at least its title
defined in frontmatter.
Image files
All internal image files used in Tech Docs content should go in the src/images
directory, located at the root of this project.
Writing conventions
- Plugins, not plug-ins
- Titles are sentence-case (“Application monitoring with New Relic”)
- Page titles prefer ‘-ing’ verb forms (“Using MySQL”, “Serving over HTTPS”)